1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module glib.c.types; 26 27 public alias uint uid_t; 28 public alias int pid_t; 29 30 version( Windows ) 31 { 32 alias int glong; 33 alias uint gulong; 34 } 35 else version( X86_64 ) 36 { 37 alias long glong; 38 alias ulong gulong; 39 } 40 else 41 { 42 alias int glong; 43 alias uint gulong; 44 } 45 46 version (Windows) 47 { 48 private import core.stdc.stdio; 49 50 static if( !is(typeof(fdopen(0, null))) ) 51 { 52 extern (C) FILE* fdopen(int, char*); 53 } 54 } 55 56 struct Scoped(T) 57 { 58 T payload; 59 60 alias payload this; 61 62 @disable this(); 63 @disable this(this); 64 65 ~this() 66 { 67 .destroy(payload); 68 } 69 } 70 71 auto getScopedGobject(T, Args...)(auto ref Args args) if (is(T == class)) 72 { 73 Scoped!(T) result = void; 74 result.payload = new T(args); 75 76 return result; 77 } 78 79 /** 80 * Get the length of a zero terminated array. 81 */ 82 size_t getArrayLength(T)(T* arr) 83 { 84 size_t len; 85 86 for ( ; arr[len]; len++ ){} 87 88 return len; 89 } 90 91 unittest 92 { 93 assert(getArrayLength("aaaaaaaaa\0".ptr) == 9); 94 } 95 96 Type* gMalloc(Type)() 97 { 98 import glib.c.functions; 99 return cast(Type*)g_malloc0(Type.sizeof); 100 } 101 102 alias void* GIConv; 103 104 /** 105 * Integer representing a day of the month; between 1 and 31. 106 * 107 * The %G_DATE_BAD_DAY value represents an invalid day of the month. 108 */ 109 public alias ubyte GDateDay; 110 111 /** 112 * Integer type representing a year. 113 * 114 * The %G_DATE_BAD_YEAR value is the invalid value. The year 115 * must be 1 or higher; negative ([BCE](https://en.wikipedia.org/wiki/Common_Era)) 116 * years are not allowed. 117 * 118 * The year is represented with four digits. 119 */ 120 public alias ushort GDateYear; 121 122 /** 123 * Opaque type. See g_main_context_pusher_new() for details. 124 */ 125 public alias void GMainContextPusher; 126 127 /** 128 * Opaque type. See g_mutex_locker_new() for details. 129 */ 130 public alias void GMutexLocker; 131 132 /** 133 * A type which is used to hold a process identification. 134 * 135 * On UNIX, processes are identified by a process id (an integer), 136 * while Windows uses process handles (which are pointers). 137 * 138 * GPid is used in GLib only for descendant processes spawned with 139 * the g_spawn functions. 140 */ 141 public alias int GPid; 142 143 /** 144 * A GQuark is a non-zero integer which uniquely identifies a 145 * particular string. A GQuark value of zero is associated to %NULL. 146 */ 147 public alias uint GQuark; 148 149 /** 150 * Opaque type. See g_rw_lock_reader_locker_new() for details. 151 */ 152 public alias void GRWLockReaderLocker; 153 154 /** 155 * Opaque type. See g_rw_lock_writer_locker_new() for details. 156 */ 157 public alias void GRWLockWriterLocker; 158 159 /** 160 * Opaque type. See g_rec_mutex_locker_new() for details. 161 */ 162 public alias void GRecMutexLocker; 163 164 /** 165 * A typedef for a reference-counted string. A pointer to a #GRefString can be 166 * treated like a standard `char*` array by all code, but can additionally have 167 * `g_ref_string_*()` methods called on it. `g_ref_string_*()` methods cannot be 168 * called on `char*` arrays not allocated using g_ref_string_new(). 169 * 170 * If using #GRefString with autocleanups, g_autoptr() must be used rather than 171 * g_autofree(), so that the reference counting metadata is also freed. 172 */ 173 public alias char GRefString; 174 175 /** 176 * A typedef alias for gchar**. This is mostly useful when used together with 177 * g_auto(). 178 */ 179 public alias char** GStrv; 180 181 /** 182 * Simply a replacement for `time_t`. It has been deprecated 183 * since it is not equivalent to `time_t` on 64-bit platforms 184 * with a 64-bit `time_t`. 185 * 186 * Unrelated to #GTimer. 187 * 188 * Note that #GTime is defined to always be a 32-bit integer, 189 * unlike `time_t` which may be 64-bit on some systems. Therefore, 190 * #GTime will overflow in the year 2038, and you cannot use the 191 * address of a #GTime variable as argument to the UNIX time() 192 * function. 193 * 194 * Instead, do the following: 195 * 196 * |[<!-- language="C" --> 197 * time_t ttime; 198 * GTime gtime; 199 * 200 * time (&ttime); 201 * gtime = (GTime)ttime; 202 * ]| 203 * 204 * Deprecated: This is not [Y2038-safe](https://en.wikipedia.org/wiki/Year_2038_problem). 205 * Use #GDateTime or #time_t instead. 206 */ 207 public alias int GTime; 208 209 /** 210 * A value representing an interval of time, in microseconds. 211 */ 212 public alias long GTimeSpan; 213 214 enum GPriority 215 { 216 HIGH = -100, 217 DEFAULT = 0, 218 HIGH_IDLE = 100, 219 DEFAULT_IDLE = 200, 220 LOW = 300 221 } 222 223 224 public enum GAsciiType 225 { 226 ALNUM = 1, 227 ALPHA = 2, 228 CNTRL = 4, 229 DIGIT = 8, 230 GRAPH = 16, 231 LOWER = 32, 232 PRINT = 64, 233 PUNCT = 128, 234 SPACE = 256, 235 UPPER = 512, 236 XDIGIT = 1024, 237 } 238 alias GAsciiType AsciiType; 239 240 /** 241 * Error codes returned by bookmark file parsing. 242 */ 243 public enum GBookmarkFileError 244 { 245 /** 246 * URI was ill-formed 247 */ 248 INVALID_URI = 0, 249 /** 250 * a requested field was not found 251 */ 252 INVALID_VALUE = 1, 253 /** 254 * a requested application did 255 * not register a bookmark 256 */ 257 APP_NOT_REGISTERED = 2, 258 /** 259 * a requested URI was not found 260 */ 261 URI_NOT_FOUND = 3, 262 /** 263 * document was ill formed 264 */ 265 READ = 4, 266 /** 267 * the text being parsed was 268 * in an unknown encoding 269 */ 270 UNKNOWN_ENCODING = 5, 271 /** 272 * an error occurred while writing 273 */ 274 WRITE = 6, 275 /** 276 * requested file was not found 277 */ 278 FILE_NOT_FOUND = 7, 279 } 280 alias GBookmarkFileError BookmarkFileError; 281 282 /** 283 * The hashing algorithm to be used by #GChecksum when performing the 284 * digest of some data. 285 * 286 * Note that the #GChecksumType enumeration may be extended at a later 287 * date to include new hashing algorithm types. 288 * 289 * Since: 2.16 290 */ 291 public enum GChecksumType 292 { 293 /** 294 * Use the MD5 hashing algorithm 295 */ 296 MD5 = 0, 297 /** 298 * Use the SHA-1 hashing algorithm 299 */ 300 SHA1 = 1, 301 /** 302 * Use the SHA-256 hashing algorithm 303 */ 304 SHA256 = 2, 305 /** 306 * Use the SHA-512 hashing algorithm (Since: 2.36) 307 */ 308 SHA512 = 3, 309 /** 310 * Use the SHA-384 hashing algorithm (Since: 2.51) 311 */ 312 SHA384 = 4, 313 } 314 alias GChecksumType ChecksumType; 315 316 /** 317 * Error codes returned by character set conversion routines. 318 */ 319 public enum GConvertError 320 { 321 /** 322 * Conversion between the requested character 323 * sets is not supported. 324 */ 325 NO_CONVERSION = 0, 326 /** 327 * Invalid byte sequence in conversion input; 328 * or the character sequence could not be represented in the target 329 * character set. 330 */ 331 ILLEGAL_SEQUENCE = 1, 332 /** 333 * Conversion failed for some reason. 334 */ 335 FAILED = 2, 336 /** 337 * Partial character sequence at end of input. 338 */ 339 PARTIAL_INPUT = 3, 340 /** 341 * URI is invalid. 342 */ 343 BAD_URI = 4, 344 /** 345 * Pathname is not an absolute path. 346 */ 347 NOT_ABSOLUTE_PATH = 5, 348 /** 349 * No memory available. Since: 2.40 350 */ 351 NO_MEMORY = 6, 352 /** 353 * An embedded NUL character is present in 354 * conversion output where a NUL-terminated string is expected. 355 * Since: 2.56 356 */ 357 EMBEDDED_NUL = 7, 358 } 359 alias GConvertError ConvertError; 360 361 /** 362 * This enumeration isn't used in the API, but may be useful if you need 363 * to mark a number as a day, month, or year. 364 */ 365 public enum GDateDMY 366 { 367 /** 368 * a day 369 */ 370 DAY = 0, 371 /** 372 * a month 373 */ 374 MONTH = 1, 375 /** 376 * a year 377 */ 378 YEAR = 2, 379 } 380 alias GDateDMY DateDMY; 381 382 /** 383 * Enumeration representing a month; values are %G_DATE_JANUARY, 384 * %G_DATE_FEBRUARY, etc. %G_DATE_BAD_MONTH is the invalid value. 385 */ 386 public enum GDateMonth 387 { 388 /** 389 * invalid value 390 */ 391 BAD_MONTH = 0, 392 /** 393 * January 394 */ 395 JANUARY = 1, 396 /** 397 * February 398 */ 399 FEBRUARY = 2, 400 /** 401 * March 402 */ 403 MARCH = 3, 404 /** 405 * April 406 */ 407 APRIL = 4, 408 /** 409 * May 410 */ 411 MAY = 5, 412 /** 413 * June 414 */ 415 JUNE = 6, 416 /** 417 * July 418 */ 419 JULY = 7, 420 /** 421 * August 422 */ 423 AUGUST = 8, 424 /** 425 * September 426 */ 427 SEPTEMBER = 9, 428 /** 429 * October 430 */ 431 OCTOBER = 10, 432 /** 433 * November 434 */ 435 NOVEMBER = 11, 436 /** 437 * December 438 */ 439 DECEMBER = 12, 440 } 441 alias GDateMonth DateMonth; 442 443 /** 444 * Enumeration representing a day of the week; %G_DATE_MONDAY, 445 * %G_DATE_TUESDAY, etc. %G_DATE_BAD_WEEKDAY is an invalid weekday. 446 */ 447 public enum GDateWeekday 448 { 449 /** 450 * invalid value 451 */ 452 BAD_WEEKDAY = 0, 453 /** 454 * Monday 455 */ 456 MONDAY = 1, 457 /** 458 * Tuesday 459 */ 460 TUESDAY = 2, 461 /** 462 * Wednesday 463 */ 464 WEDNESDAY = 3, 465 /** 466 * Thursday 467 */ 468 THURSDAY = 4, 469 /** 470 * Friday 471 */ 472 FRIDAY = 5, 473 /** 474 * Saturday 475 */ 476 SATURDAY = 6, 477 /** 478 * Sunday 479 */ 480 SUNDAY = 7, 481 } 482 alias GDateWeekday DateWeekday; 483 484 /** 485 * The possible errors, used in the @v_error field 486 * of #GTokenValue, when the token is a %G_TOKEN_ERROR. 487 */ 488 public enum GErrorType 489 { 490 /** 491 * unknown error 492 */ 493 UNKNOWN = 0, 494 /** 495 * unexpected end of file 496 */ 497 UNEXP_EOF = 1, 498 /** 499 * unterminated string constant 500 */ 501 UNEXP_EOF_IN_STRING = 2, 502 /** 503 * unterminated comment 504 */ 505 UNEXP_EOF_IN_COMMENT = 3, 506 /** 507 * non-digit character in a number 508 */ 509 NON_DIGIT_IN_CONST = 4, 510 /** 511 * digit beyond radix in a number 512 */ 513 DIGIT_RADIX = 5, 514 /** 515 * non-decimal floating point number 516 */ 517 FLOAT_RADIX = 6, 518 /** 519 * malformed floating point number 520 */ 521 FLOAT_MALFORMED = 7, 522 } 523 alias GErrorType ErrorType; 524 525 /** 526 * Values corresponding to @errno codes returned from file operations 527 * on UNIX. Unlike @errno codes, GFileError values are available on 528 * all systems, even Windows. The exact meaning of each code depends 529 * on what sort of file operation you were performing; the UNIX 530 * documentation gives more details. The following error code descriptions 531 * come from the GNU C Library manual, and are under the copyright 532 * of that manual. 533 * 534 * It's not very portable to make detailed assumptions about exactly 535 * which errors will be returned from a given operation. Some errors 536 * don't occur on some systems, etc., sometimes there are subtle 537 * differences in when a system will report a given error, etc. 538 */ 539 public enum GFileError 540 { 541 /** 542 * Operation not permitted; only the owner of 543 * the file (or other resource) or processes with special privileges 544 * can perform the operation. 545 */ 546 EXIST = 0, 547 /** 548 * File is a directory; you cannot open a directory 549 * for writing, or create or remove hard links to it. 550 */ 551 ISDIR = 1, 552 /** 553 * Permission denied; the file permissions do not 554 * allow the attempted operation. 555 */ 556 ACCES = 2, 557 /** 558 * Filename too long. 559 */ 560 NAMETOOLONG = 3, 561 /** 562 * No such file or directory. This is a "file 563 * doesn't exist" error for ordinary files that are referenced in 564 * contexts where they are expected to already exist. 565 */ 566 NOENT = 4, 567 /** 568 * A file that isn't a directory was specified when 569 * a directory is required. 570 */ 571 NOTDIR = 5, 572 /** 573 * No such device or address. The system tried to 574 * use the device represented by a file you specified, and it 575 * couldn't find the device. This can mean that the device file was 576 * installed incorrectly, or that the physical device is missing or 577 * not correctly attached to the computer. 578 */ 579 NXIO = 6, 580 /** 581 * The underlying file system of the specified file 582 * does not support memory mapping. 583 */ 584 NODEV = 7, 585 /** 586 * The directory containing the new link can't be 587 * modified because it's on a read-only file system. 588 */ 589 ROFS = 8, 590 /** 591 * Text file busy. 592 */ 593 TXTBSY = 9, 594 /** 595 * You passed in a pointer to bad memory. 596 * (GLib won't reliably return this, don't pass in pointers to bad 597 * memory.) 598 */ 599 FAULT = 10, 600 /** 601 * Too many levels of symbolic links were encountered 602 * in looking up a file name. This often indicates a cycle of symbolic 603 * links. 604 */ 605 LOOP = 11, 606 /** 607 * No space left on device; write operation on a 608 * file failed because the disk is full. 609 */ 610 NOSPC = 12, 611 /** 612 * No memory available. The system cannot allocate 613 * more virtual memory because its capacity is full. 614 */ 615 NOMEM = 13, 616 /** 617 * The current process has too many files open and 618 * can't open any more. Duplicate descriptors do count toward this 619 * limit. 620 */ 621 MFILE = 14, 622 /** 623 * There are too many distinct file openings in the 624 * entire system. 625 */ 626 NFILE = 15, 627 /** 628 * Bad file descriptor; for example, I/O on a 629 * descriptor that has been closed or reading from a descriptor open 630 * only for writing (or vice versa). 631 */ 632 BADF = 16, 633 /** 634 * Invalid argument. This is used to indicate 635 * various kinds of problems with passing the wrong argument to a 636 * library function. 637 */ 638 INVAL = 17, 639 /** 640 * Broken pipe; there is no process reading from the 641 * other end of a pipe. Every library function that returns this 642 * error code also generates a 'SIGPIPE' signal; this signal 643 * terminates the program if not handled or blocked. Thus, your 644 * program will never actually see this code unless it has handled 645 * or blocked 'SIGPIPE'. 646 */ 647 PIPE = 18, 648 /** 649 * Resource temporarily unavailable; the call might 650 * work if you try again later. 651 */ 652 AGAIN = 19, 653 /** 654 * Interrupted function call; an asynchronous signal 655 * occurred and prevented completion of the call. When this 656 * happens, you should try the call again. 657 */ 658 INTR = 20, 659 /** 660 * Input/output error; usually used for physical read 661 * or write errors. i.e. the disk or other physical device hardware 662 * is returning errors. 663 */ 664 IO = 21, 665 /** 666 * Operation not permitted; only the owner of the 667 * file (or other resource) or processes with special privileges can 668 * perform the operation. 669 */ 670 PERM = 22, 671 /** 672 * Function not implemented; this indicates that 673 * the system is missing some functionality. 674 */ 675 NOSYS = 23, 676 /** 677 * Does not correspond to a UNIX error code; this 678 * is the standard "failed for unspecified reason" error code present 679 * in all #GError error code enumerations. Returned if no specific 680 * code applies. 681 */ 682 FAILED = 24, 683 } 684 alias GFileError FileError; 685 686 /** 687 * Flags to pass to g_file_set_contents_full() to affect its safety and 688 * performance. 689 * 690 * Since: 2.66 691 */ 692 public enum GFileSetContentsFlags 693 { 694 /** 695 * No guarantees about file consistency or durability. 696 * The most dangerous setting, which is slightly faster than other settings. 697 */ 698 NONE = 0, 699 /** 700 * Guarantee file consistency: after a crash, 701 * either the old version of the file or the new version of the file will be 702 * available, but not a mixture. On Unix systems this equates to an `fsync()` 703 * on the file and use of an atomic `rename()` of the new version of the file 704 * over the old. 705 */ 706 CONSISTENT = 1, 707 /** 708 * Guarantee file durability: after a crash, the 709 * new version of the file will be available. On Unix systems this equates to 710 * an `fsync()` on the file (if %G_FILE_SET_CONTENTS_CONSISTENT is unset), or 711 * the effects of %G_FILE_SET_CONTENTS_CONSISTENT plus an `fsync()` on the 712 * directory containing the file after calling `rename()`. 713 */ 714 DURABLE = 2, 715 /** 716 * Only apply consistency and durability 717 * guarantees if the file already exists. This may speed up file operations 718 * if the file doesn’t currently exist, but may result in a corrupted version 719 * of the new file if the system crashes while writing it. 720 */ 721 ONLY_EXISTING = 4, 722 } 723 alias GFileSetContentsFlags FileSetContentsFlags; 724 725 /** 726 * A test to perform on a file using g_file_test(). 727 */ 728 public enum GFileTest 729 { 730 /** 731 * %TRUE if the file is a regular file 732 * (not a directory). Note that this test will also return %TRUE 733 * if the tested file is a symlink to a regular file. 734 */ 735 IS_REGULAR = 1, 736 /** 737 * %TRUE if the file is a symlink. 738 */ 739 IS_SYMLINK = 2, 740 /** 741 * %TRUE if the file is a directory. 742 */ 743 IS_DIR = 4, 744 /** 745 * %TRUE if the file is executable. 746 */ 747 IS_EXECUTABLE = 8, 748 /** 749 * %TRUE if the file exists. It may or may not 750 * be a regular file. 751 */ 752 EXISTS = 16, 753 } 754 alias GFileTest FileTest; 755 756 /** 757 * Flags to modify the format of the string returned by g_format_size_full(). 758 */ 759 public enum GFormatSizeFlags 760 { 761 /** 762 * behave the same as g_format_size() 763 */ 764 DEFAULT = 0, 765 /** 766 * include the exact number of bytes as part 767 * of the returned string. For example, "45.6 kB (45,612 bytes)". 768 */ 769 LONG_FORMAT = 1, 770 /** 771 * use IEC (base 1024) units with "KiB"-style 772 * suffixes. IEC units should only be used for reporting things with 773 * a strong "power of 2" basis, like RAM sizes or RAID stripe sizes. 774 * Network and storage sizes should be reported in the normal SI units. 775 */ 776 IEC_UNITS = 2, 777 /** 778 * set the size as a quantity in bits, rather than 779 * bytes, and return units in bits. For example, ‘Mb’ rather than ‘MB’. 780 */ 781 BITS = 4, 782 } 783 alias GFormatSizeFlags FormatSizeFlags; 784 785 /** 786 * Flags used internally in the #GHook implementation. 787 */ 788 public enum GHookFlagMask 789 { 790 /** 791 * set if the hook has not been destroyed 792 */ 793 ACTIVE = 1, 794 /** 795 * set if the hook is currently being run 796 */ 797 IN_CALL = 2, 798 /** 799 * A mask covering all bits reserved for 800 * hook flags; see %G_HOOK_FLAG_USER_SHIFT 801 */ 802 MASK = 15, 803 } 804 alias GHookFlagMask HookFlagMask; 805 806 /** 807 * Error codes returned by #GIOChannel operations. 808 */ 809 public enum GIOChannelError 810 { 811 /** 812 * File too large. 813 */ 814 FBIG = 0, 815 /** 816 * Invalid argument. 817 */ 818 INVAL = 1, 819 /** 820 * IO error. 821 */ 822 IO = 2, 823 /** 824 * File is a directory. 825 */ 826 ISDIR = 3, 827 /** 828 * No space left on device. 829 */ 830 NOSPC = 4, 831 /** 832 * No such device or address. 833 */ 834 NXIO = 5, 835 /** 836 * Value too large for defined datatype. 837 */ 838 OVERFLOW = 6, 839 /** 840 * Broken pipe. 841 */ 842 PIPE = 7, 843 /** 844 * Some other error. 845 */ 846 FAILED = 8, 847 } 848 alias GIOChannelError IOChannelError; 849 850 /** 851 * A bitwise combination representing a condition to watch for on an 852 * event source. 853 */ 854 public enum GIOCondition 855 { 856 /** 857 * There is data to read. 858 */ 859 IN = 1, 860 /** 861 * Data can be written (without blocking). 862 */ 863 OUT = 4, 864 /** 865 * There is urgent data to read. 866 */ 867 PRI = 2, 868 /** 869 * Error condition. 870 */ 871 ERR = 8, 872 /** 873 * Hung up (the connection has been broken, usually for 874 * pipes and sockets). 875 */ 876 HUP = 16, 877 /** 878 * Invalid request. The file descriptor is not open. 879 */ 880 NVAL = 32, 881 } 882 alias GIOCondition IOCondition; 883 884 /** 885 * #GIOError is only used by the deprecated functions 886 * g_io_channel_read(), g_io_channel_write(), and g_io_channel_seek(). 887 */ 888 public enum GIOError 889 { 890 /** 891 * no error 892 */ 893 NONE = 0, 894 /** 895 * an EAGAIN error occurred 896 */ 897 AGAIN = 1, 898 /** 899 * an EINVAL error occurred 900 */ 901 INVAL = 2, 902 /** 903 * another error occurred 904 */ 905 UNKNOWN = 3, 906 } 907 alias GIOError IOError; 908 909 /** 910 * Specifies properties of a #GIOChannel. Some of the flags can only be 911 * read with g_io_channel_get_flags(), but not changed with 912 * g_io_channel_set_flags(). 913 */ 914 public enum GIOFlags 915 { 916 /** 917 * turns on append mode, corresponds to %O_APPEND 918 * (see the documentation of the UNIX open() syscall) 919 */ 920 APPEND = 1, 921 /** 922 * turns on nonblocking mode, corresponds to 923 * %O_NONBLOCK/%O_NDELAY (see the documentation of the UNIX open() 924 * syscall) 925 */ 926 NONBLOCK = 2, 927 /** 928 * indicates that the io channel is readable. 929 * This flag cannot be changed. 930 */ 931 IS_READABLE = 4, 932 /** 933 * indicates that the io channel is writable. 934 * This flag cannot be changed. 935 */ 936 IS_WRITABLE = 8, 937 /** 938 * a misspelled version of @G_IO_FLAG_IS_WRITABLE 939 * that existed before the spelling was fixed in GLib 2.30. It is kept 940 * here for compatibility reasons. Deprecated since 2.30 941 */ 942 IS_WRITEABLE = 8, 943 /** 944 * indicates that the io channel is seekable, 945 * i.e. that g_io_channel_seek_position() can be used on it. 946 * This flag cannot be changed. 947 */ 948 IS_SEEKABLE = 16, 949 /** 950 * the mask that specifies all the valid flags. 951 */ 952 MASK = 31, 953 /** 954 * the mask of the flags that are returned from 955 * g_io_channel_get_flags() 956 */ 957 GET_MASK = 31, 958 /** 959 * the mask of the flags that the user can modify 960 * with g_io_channel_set_flags() 961 */ 962 SET_MASK = 3, 963 } 964 alias GIOFlags IOFlags; 965 966 /** 967 * Statuses returned by most of the #GIOFuncs functions. 968 */ 969 public enum GIOStatus 970 { 971 /** 972 * An error occurred. 973 */ 974 ERROR = 0, 975 /** 976 * Success. 977 */ 978 NORMAL = 1, 979 /** 980 * End of file. 981 */ 982 EOF = 2, 983 /** 984 * Resource temporarily unavailable. 985 */ 986 AGAIN = 3, 987 } 988 alias GIOStatus IOStatus; 989 990 /** 991 * Error codes returned by key file parsing. 992 */ 993 public enum GKeyFileError 994 { 995 /** 996 * the text being parsed was in 997 * an unknown encoding 998 */ 999 UNKNOWN_ENCODING = 0, 1000 /** 1001 * document was ill-formed 1002 */ 1003 PARSE = 1, 1004 /** 1005 * the file was not found 1006 */ 1007 NOT_FOUND = 2, 1008 /** 1009 * a requested key was not found 1010 */ 1011 KEY_NOT_FOUND = 3, 1012 /** 1013 * a requested group was not found 1014 */ 1015 GROUP_NOT_FOUND = 4, 1016 /** 1017 * a value could not be parsed 1018 */ 1019 INVALID_VALUE = 5, 1020 } 1021 alias GKeyFileError KeyFileError; 1022 1023 /** 1024 * Flags which influence the parsing. 1025 */ 1026 public enum GKeyFileFlags 1027 { 1028 /** 1029 * No flags, default behaviour 1030 */ 1031 NONE = 0, 1032 /** 1033 * Use this flag if you plan to write the 1034 * (possibly modified) contents of the key file back to a file; 1035 * otherwise all comments will be lost when the key file is 1036 * written back. 1037 */ 1038 KEEP_COMMENTS = 1, 1039 /** 1040 * Use this flag if you plan to write the 1041 * (possibly modified) contents of the key file back to a file; 1042 * otherwise only the translations for the current language will be 1043 * written back. 1044 */ 1045 KEEP_TRANSLATIONS = 2, 1046 } 1047 alias GKeyFileFlags KeyFileFlags; 1048 1049 /** 1050 * Flags specifying the level of log messages. 1051 * 1052 * It is possible to change how GLib treats messages of the various 1053 * levels using g_log_set_handler() and g_log_set_fatal_mask(). 1054 */ 1055 public enum GLogLevelFlags 1056 { 1057 /** 1058 * internal flag 1059 */ 1060 FLAG_RECURSION = 1, 1061 /** 1062 * internal flag 1063 */ 1064 FLAG_FATAL = 2, 1065 /** 1066 * log level for errors, see g_error(). 1067 * This level is also used for messages produced by g_assert(). 1068 */ 1069 LEVEL_ERROR = 4, 1070 /** 1071 * log level for critical warning messages, see 1072 * g_critical(). 1073 * This level is also used for messages produced by g_return_if_fail() 1074 * and g_return_val_if_fail(). 1075 */ 1076 LEVEL_CRITICAL = 8, 1077 /** 1078 * log level for warnings, see g_warning() 1079 */ 1080 LEVEL_WARNING = 16, 1081 /** 1082 * log level for messages, see g_message() 1083 */ 1084 LEVEL_MESSAGE = 32, 1085 /** 1086 * log level for informational messages, see g_info() 1087 */ 1088 LEVEL_INFO = 64, 1089 /** 1090 * log level for debug messages, see g_debug() 1091 */ 1092 LEVEL_DEBUG = 128, 1093 /** 1094 * a mask including all log levels 1095 */ 1096 LEVEL_MASK = -4, 1097 } 1098 alias GLogLevelFlags LogLevelFlags; 1099 1100 /** 1101 * Return values from #GLogWriterFuncs to indicate whether the given log entry 1102 * was successfully handled by the writer, or whether there was an error in 1103 * handling it (and hence a fallback writer should be used). 1104 * 1105 * If a #GLogWriterFunc ignores a log entry, it should return 1106 * %G_LOG_WRITER_HANDLED. 1107 * 1108 * Since: 2.50 1109 */ 1110 public enum GLogWriterOutput 1111 { 1112 /** 1113 * Log writer has handled the log entry. 1114 */ 1115 HANDLED = 1, 1116 /** 1117 * Log writer could not handle the log entry. 1118 */ 1119 UNHANDLED = 0, 1120 } 1121 alias GLogWriterOutput LogWriterOutput; 1122 1123 /** 1124 * Flags to pass to g_main_context_new_with_flags() which affect the behaviour 1125 * of a #GMainContext. 1126 * 1127 * Since: 2.72 1128 */ 1129 public enum GMainContextFlags 1130 { 1131 /** 1132 * Default behaviour. 1133 */ 1134 NONE = 0, 1135 /** 1136 * Assume that polling for events will 1137 * free the thread to process other jobs. That's useful if you're using 1138 * `g_main_context_{prepare,query,check,dispatch}` to integrate GMainContext in 1139 * other event loops. 1140 */ 1141 OWNERLESS_POLLING = 1, 1142 } 1143 alias GMainContextFlags MainContextFlags; 1144 1145 /** 1146 * A mixed enumerated type and flags field. You must specify one type 1147 * (string, strdup, boolean, tristate). Additionally, you may optionally 1148 * bitwise OR the type with the flag %G_MARKUP_COLLECT_OPTIONAL. 1149 * 1150 * It is likely that this enum will be extended in the future to 1151 * support other types. 1152 */ 1153 public enum GMarkupCollectType 1154 { 1155 /** 1156 * used to terminate the list of attributes 1157 * to collect 1158 */ 1159 INVALID = 0, 1160 /** 1161 * collect the string pointer directly from 1162 * the attribute_values[] array. Expects a parameter of type (const 1163 * char **). If %G_MARKUP_COLLECT_OPTIONAL is specified and the 1164 * attribute isn't present then the pointer will be set to %NULL 1165 */ 1166 STRING = 1, 1167 /** 1168 * as with %G_MARKUP_COLLECT_STRING, but 1169 * expects a parameter of type (char **) and g_strdup()s the 1170 * returned pointer. The pointer must be freed with g_free() 1171 */ 1172 STRDUP = 2, 1173 /** 1174 * expects a parameter of type (gboolean *) 1175 * and parses the attribute value as a boolean. Sets %FALSE if the 1176 * attribute isn't present. Valid boolean values consist of 1177 * (case-insensitive) "false", "f", "no", "n", "0" and "true", "t", 1178 * "yes", "y", "1" 1179 */ 1180 BOOLEAN = 3, 1181 /** 1182 * as with %G_MARKUP_COLLECT_BOOLEAN, but 1183 * in the case of a missing attribute a value is set that compares 1184 * equal to neither %FALSE nor %TRUE G_MARKUP_COLLECT_OPTIONAL is 1185 * implied 1186 */ 1187 TRISTATE = 4, 1188 /** 1189 * can be bitwise ORed with the other fields. 1190 * If present, allows the attribute not to appear. A default value 1191 * is set depending on what value type is used 1192 */ 1193 OPTIONAL = 65536, 1194 } 1195 alias GMarkupCollectType MarkupCollectType; 1196 1197 /** 1198 * Error codes returned by markup parsing. 1199 */ 1200 public enum GMarkupError 1201 { 1202 /** 1203 * text being parsed was not valid UTF-8 1204 */ 1205 BAD_UTF8 = 0, 1206 /** 1207 * document contained nothing, or only whitespace 1208 */ 1209 EMPTY = 1, 1210 /** 1211 * document was ill-formed 1212 */ 1213 PARSE = 2, 1214 /** 1215 * error should be set by #GMarkupParser 1216 * functions; element wasn't known 1217 */ 1218 UNKNOWN_ELEMENT = 3, 1219 /** 1220 * error should be set by #GMarkupParser 1221 * functions; attribute wasn't known 1222 */ 1223 UNKNOWN_ATTRIBUTE = 4, 1224 /** 1225 * error should be set by #GMarkupParser 1226 * functions; content was invalid 1227 */ 1228 INVALID_CONTENT = 5, 1229 /** 1230 * error should be set by #GMarkupParser 1231 * functions; a required attribute was missing 1232 */ 1233 MISSING_ATTRIBUTE = 6, 1234 } 1235 alias GMarkupError MarkupError; 1236 1237 /** 1238 * Flags that affect the behaviour of the parser. 1239 */ 1240 public enum GMarkupParseFlags 1241 { 1242 /** 1243 * flag you should not use 1244 */ 1245 DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1, 1246 /** 1247 * When this flag is set, CDATA marked 1248 * sections are not passed literally to the @passthrough function of 1249 * the parser. Instead, the content of the section (without the 1250 * `<![CDATA[` and `]]>`) is 1251 * passed to the @text function. This flag was added in GLib 2.12 1252 */ 1253 TREAT_CDATA_AS_TEXT = 2, 1254 /** 1255 * Normally errors caught by GMarkup 1256 * itself have line/column information prefixed to them to let the 1257 * caller know the location of the error. When this flag is set the 1258 * location information is also prefixed to errors generated by the 1259 * #GMarkupParser implementation functions 1260 */ 1261 PREFIX_ERROR_POSITION = 4, 1262 /** 1263 * Ignore (don't report) qualified 1264 * attributes and tags, along with their contents. A qualified 1265 * attribute or tag is one that contains ':' in its name (ie: is in 1266 * another namespace). Since: 2.40. 1267 */ 1268 IGNORE_QUALIFIED = 8, 1269 } 1270 alias GMarkupParseFlags MarkupParseFlags; 1271 1272 /** 1273 * Defines how a Unicode string is transformed in a canonical 1274 * form, standardizing such issues as whether a character with 1275 * an accent is represented as a base character and combining 1276 * accent or as a single precomposed character. Unicode strings 1277 * should generally be normalized before comparing them. 1278 */ 1279 public enum GNormalizeMode 1280 { 1281 /** 1282 * standardize differences that do not affect the 1283 * text content, such as the above-mentioned accent representation 1284 */ 1285 DEFAULT = 0, 1286 /** 1287 * another name for %G_NORMALIZE_DEFAULT 1288 */ 1289 NFD = 0, 1290 /** 1291 * like %G_NORMALIZE_DEFAULT, but with 1292 * composed forms rather than a maximally decomposed form 1293 */ 1294 DEFAULT_COMPOSE = 1, 1295 /** 1296 * another name for %G_NORMALIZE_DEFAULT_COMPOSE 1297 */ 1298 NFC = 1, 1299 /** 1300 * beyond %G_NORMALIZE_DEFAULT also standardize the 1301 * "compatibility" characters in Unicode, such as SUPERSCRIPT THREE 1302 * to the standard forms (in this case DIGIT THREE). Formatting 1303 * information may be lost but for most text operations such 1304 * characters should be considered the same 1305 */ 1306 ALL = 2, 1307 /** 1308 * another name for %G_NORMALIZE_ALL 1309 */ 1310 NFKD = 2, 1311 /** 1312 * like %G_NORMALIZE_ALL, but with composed 1313 * forms rather than a maximally decomposed form 1314 */ 1315 ALL_COMPOSE = 3, 1316 /** 1317 * another name for %G_NORMALIZE_ALL_COMPOSE 1318 */ 1319 NFKC = 3, 1320 } 1321 alias GNormalizeMode NormalizeMode; 1322 1323 /** 1324 * Error codes returned by functions converting a string to a number. 1325 * 1326 * Since: 2.54 1327 */ 1328 public enum GNumberParserError 1329 { 1330 /** 1331 * String was not a valid number. 1332 */ 1333 INVALID = 0, 1334 /** 1335 * String was a number, but out of bounds. 1336 */ 1337 OUT_OF_BOUNDS = 1, 1338 } 1339 alias GNumberParserError NumberParserError; 1340 1341 /** 1342 * The possible statuses of a one-time initialization function 1343 * controlled by a #GOnce struct. 1344 * 1345 * Since: 2.4 1346 */ 1347 public enum GOnceStatus 1348 { 1349 /** 1350 * the function has not been called yet. 1351 */ 1352 NOTCALLED = 0, 1353 /** 1354 * the function call is currently in progress. 1355 */ 1356 PROGRESS = 1, 1357 /** 1358 * the function has been called. 1359 */ 1360 READY = 2, 1361 } 1362 alias GOnceStatus OnceStatus; 1363 1364 /** 1365 * The #GOptionArg enum values determine which type of extra argument the 1366 * options expect to find. If an option expects an extra argument, it can 1367 * be specified in several ways; with a short option: `-x arg`, with a long 1368 * option: `--name arg` or combined in a single argument: `--name=arg`. 1369 */ 1370 public enum GOptionArg 1371 { 1372 /** 1373 * No extra argument. This is useful for simple flags. 1374 */ 1375 NONE = 0, 1376 /** 1377 * The option takes a UTF-8 string argument. 1378 */ 1379 STRING = 1, 1380 /** 1381 * The option takes an integer argument. 1382 */ 1383 INT = 2, 1384 /** 1385 * The option provides a callback (of type 1386 * #GOptionArgFunc) to parse the extra argument. 1387 */ 1388 CALLBACK = 3, 1389 /** 1390 * The option takes a filename as argument, which will 1391 * be in the GLib filename encoding rather than UTF-8. 1392 */ 1393 FILENAME = 4, 1394 /** 1395 * The option takes a string argument, multiple 1396 * uses of the option are collected into an array of strings. 1397 */ 1398 STRING_ARRAY = 5, 1399 /** 1400 * The option takes a filename as argument, 1401 * multiple uses of the option are collected into an array of strings. 1402 */ 1403 FILENAME_ARRAY = 6, 1404 /** 1405 * The option takes a double argument. The argument 1406 * can be formatted either for the user's locale or for the "C" locale. 1407 * Since 2.12 1408 */ 1409 DOUBLE = 7, 1410 /** 1411 * The option takes a 64-bit integer. Like 1412 * %G_OPTION_ARG_INT but for larger numbers. The number can be in 1413 * decimal base, or in hexadecimal (when prefixed with `0x`, for 1414 * example, `0xffffffff`). Since 2.12 1415 */ 1416 INT64 = 8, 1417 } 1418 alias GOptionArg OptionArg; 1419 1420 /** 1421 * Error codes returned by option parsing. 1422 */ 1423 public enum GOptionError 1424 { 1425 /** 1426 * An option was not known to the parser. 1427 * This error will only be reported, if the parser hasn't been instructed 1428 * to ignore unknown options, see g_option_context_set_ignore_unknown_options(). 1429 */ 1430 UNKNOWN_OPTION = 0, 1431 /** 1432 * A value couldn't be parsed. 1433 */ 1434 BAD_VALUE = 1, 1435 /** 1436 * A #GOptionArgFunc callback failed. 1437 */ 1438 FAILED = 2, 1439 } 1440 alias GOptionError OptionError; 1441 1442 /** 1443 * Flags which modify individual options. 1444 */ 1445 public enum GOptionFlags 1446 { 1447 /** 1448 * No flags. Since: 2.42. 1449 */ 1450 NONE = 0, 1451 /** 1452 * The option doesn't appear in `--help` output. 1453 */ 1454 HIDDEN = 1, 1455 /** 1456 * The option appears in the main section of the 1457 * `--help` output, even if it is defined in a group. 1458 */ 1459 IN_MAIN = 2, 1460 /** 1461 * For options of the %G_OPTION_ARG_NONE kind, this 1462 * flag indicates that the sense of the option is reversed. 1463 */ 1464 REVERSE = 4, 1465 /** 1466 * For options of the %G_OPTION_ARG_CALLBACK kind, 1467 * this flag indicates that the callback does not take any argument 1468 * (like a %G_OPTION_ARG_NONE option). Since 2.8 1469 */ 1470 NO_ARG = 8, 1471 /** 1472 * For options of the %G_OPTION_ARG_CALLBACK 1473 * kind, this flag indicates that the argument should be passed to the 1474 * callback in the GLib filename encoding rather than UTF-8. Since 2.8 1475 */ 1476 FILENAME = 16, 1477 /** 1478 * For options of the %G_OPTION_ARG_CALLBACK 1479 * kind, this flag indicates that the argument supply is optional. 1480 * If no argument is given then data of %GOptionParseFunc will be 1481 * set to NULL. Since 2.8 1482 */ 1483 OPTIONAL_ARG = 32, 1484 /** 1485 * This flag turns off the automatic conflict 1486 * resolution which prefixes long option names with `groupname-` if 1487 * there is a conflict. This option should only be used in situations 1488 * where aliasing is necessary to model some legacy commandline interface. 1489 * It is not safe to use this option, unless all option groups are under 1490 * your direct control. Since 2.8. 1491 */ 1492 NOALIAS = 64, 1493 } 1494 alias GOptionFlags OptionFlags; 1495 1496 /** 1497 * Flags specifying compile-time options. 1498 * 1499 * Since: 2.14 1500 */ 1501 public enum GRegexCompileFlags 1502 { 1503 /** 1504 * Letters in the pattern match both upper- and 1505 * lowercase letters. This option can be changed within a pattern 1506 * by a "(?i)" option setting. 1507 */ 1508 CASELESS = 1, 1509 /** 1510 * By default, GRegex treats the strings as consisting 1511 * of a single line of characters (even if it actually contains 1512 * newlines). The "start of line" metacharacter ("^") matches only 1513 * at the start of the string, while the "end of line" metacharacter 1514 * ("$") matches only at the end of the string, or before a terminating 1515 * newline (unless %G_REGEX_DOLLAR_ENDONLY is set). When 1516 * %G_REGEX_MULTILINE is set, the "start of line" and "end of line" 1517 * constructs match immediately following or immediately before any 1518 * newline in the string, respectively, as well as at the very start 1519 * and end. This can be changed within a pattern by a "(?m)" option 1520 * setting. 1521 */ 1522 MULTILINE = 2, 1523 /** 1524 * A dot metacharacter (".") in the pattern matches all 1525 * characters, including newlines. Without it, newlines are excluded. 1526 * This option can be changed within a pattern by a ("?s") option setting. 1527 */ 1528 DOTALL = 4, 1529 /** 1530 * Whitespace data characters in the pattern are 1531 * totally ignored except when escaped or inside a character class. 1532 * Whitespace does not include the VT character (code 11). In addition, 1533 * characters between an unescaped "#" outside a character class and 1534 * the next newline character, inclusive, are also ignored. This can 1535 * be changed within a pattern by a "(?x)" option setting. 1536 */ 1537 EXTENDED = 8, 1538 /** 1539 * The pattern is forced to be "anchored", that is, 1540 * it is constrained to match only at the first matching point in the 1541 * string that is being searched. This effect can also be achieved by 1542 * appropriate constructs in the pattern itself such as the "^" 1543 * metacharacter. 1544 */ 1545 ANCHORED = 16, 1546 /** 1547 * A dollar metacharacter ("$") in the pattern 1548 * matches only at the end of the string. Without this option, a 1549 * dollar also matches immediately before the final character if 1550 * it is a newline (but not before any other newlines). This option 1551 * is ignored if %G_REGEX_MULTILINE is set. 1552 */ 1553 DOLLAR_ENDONLY = 32, 1554 /** 1555 * Inverts the "greediness" of the quantifiers so that 1556 * they are not greedy by default, but become greedy if followed by "?". 1557 * It can also be set by a "(?U)" option setting within the pattern. 1558 */ 1559 UNGREEDY = 512, 1560 /** 1561 * Usually strings must be valid UTF-8 strings, using this 1562 * flag they are considered as a raw sequence of bytes. 1563 */ 1564 RAW = 2048, 1565 /** 1566 * Disables the use of numbered capturing 1567 * parentheses in the pattern. Any opening parenthesis that is not 1568 * followed by "?" behaves as if it were followed by "?:" but named 1569 * parentheses can still be used for capturing (and they acquire numbers 1570 * in the usual way). 1571 */ 1572 NO_AUTO_CAPTURE = 4096, 1573 /** 1574 * Optimize the regular expression. If the pattern will 1575 * be used many times, then it may be worth the effort to optimize it 1576 * to improve the speed of matches. 1577 */ 1578 OPTIMIZE = 8192, 1579 /** 1580 * Limits an unanchored pattern to match before (or at) the 1581 * first newline. Since: 2.34 1582 */ 1583 FIRSTLINE = 262144, 1584 /** 1585 * Names used to identify capturing subpatterns need not 1586 * be unique. This can be helpful for certain types of pattern when it 1587 * is known that only one instance of the named subpattern can ever be 1588 * matched. 1589 */ 1590 DUPNAMES = 524288, 1591 /** 1592 * Usually any newline character or character sequence is 1593 * recognized. If this option is set, the only recognized newline character 1594 * is '\r'. 1595 */ 1596 NEWLINE_CR = 1048576, 1597 /** 1598 * Usually any newline character or character sequence is 1599 * recognized. If this option is set, the only recognized newline character 1600 * is '\n'. 1601 */ 1602 NEWLINE_LF = 2097152, 1603 /** 1604 * Usually any newline character or character sequence is 1605 * recognized. If this option is set, the only recognized newline character 1606 * sequence is '\r\n'. 1607 */ 1608 NEWLINE_CRLF = 3145728, 1609 /** 1610 * Usually any newline character or character sequence 1611 * is recognized. If this option is set, the only recognized newline character 1612 * sequences are '\r', '\n', and '\r\n'. Since: 2.34 1613 */ 1614 NEWLINE_ANYCRLF = 5242880, 1615 /** 1616 * Usually any newline character or character sequence 1617 * is recognised. If this option is set, then "\R" only recognizes the newline 1618 * characters '\r', '\n' and '\r\n'. Since: 2.34 1619 */ 1620 BSR_ANYCRLF = 8388608, 1621 /** 1622 * Changes behaviour so that it is compatible with 1623 * JavaScript rather than PCRE. Since: 2.34 1624 */ 1625 JAVASCRIPT_COMPAT = 33554432, 1626 } 1627 alias GRegexCompileFlags RegexCompileFlags; 1628 1629 /** 1630 * Error codes returned by regular expressions functions. 1631 * 1632 * Since: 2.14 1633 */ 1634 public enum GRegexError 1635 { 1636 /** 1637 * Compilation of the regular expression failed. 1638 */ 1639 COMPILE = 0, 1640 /** 1641 * Optimization of the regular expression failed. 1642 */ 1643 OPTIMIZE = 1, 1644 /** 1645 * Replacement failed due to an ill-formed replacement 1646 * string. 1647 */ 1648 REPLACE = 2, 1649 /** 1650 * The match process failed. 1651 */ 1652 MATCH = 3, 1653 /** 1654 * Internal error of the regular expression engine. 1655 * Since 2.16 1656 */ 1657 INTERNAL = 4, 1658 /** 1659 * "\\" at end of pattern. Since 2.16 1660 */ 1661 STRAY_BACKSLASH = 101, 1662 /** 1663 * "\\c" at end of pattern. Since 2.16 1664 */ 1665 MISSING_CONTROL_CHAR = 102, 1666 /** 1667 * Unrecognized character follows "\\". 1668 * Since 2.16 1669 */ 1670 UNRECOGNIZED_ESCAPE = 103, 1671 /** 1672 * Numbers out of order in "{}" 1673 * quantifier. Since 2.16 1674 */ 1675 QUANTIFIERS_OUT_OF_ORDER = 104, 1676 /** 1677 * Number too big in "{}" quantifier. 1678 * Since 2.16 1679 */ 1680 QUANTIFIER_TOO_BIG = 105, 1681 /** 1682 * Missing terminating "]" for 1683 * character class. Since 2.16 1684 */ 1685 UNTERMINATED_CHARACTER_CLASS = 106, 1686 /** 1687 * Invalid escape sequence 1688 * in character class. Since 2.16 1689 */ 1690 INVALID_ESCAPE_IN_CHARACTER_CLASS = 107, 1691 /** 1692 * Range out of order in character class. 1693 * Since 2.16 1694 */ 1695 RANGE_OUT_OF_ORDER = 108, 1696 /** 1697 * Nothing to repeat. Since 2.16 1698 */ 1699 NOTHING_TO_REPEAT = 109, 1700 /** 1701 * Unrecognized character after "(?", 1702 * "(?<" or "(?P". Since 2.16 1703 */ 1704 UNRECOGNIZED_CHARACTER = 112, 1705 /** 1706 * POSIX named classes are 1707 * supported only within a class. Since 2.16 1708 */ 1709 POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113, 1710 /** 1711 * Missing terminating ")" or ")" 1712 * without opening "(". Since 2.16 1713 */ 1714 UNMATCHED_PARENTHESIS = 114, 1715 /** 1716 * Reference to non-existent 1717 * subpattern. Since 2.16 1718 */ 1719 INEXISTENT_SUBPATTERN_REFERENCE = 115, 1720 /** 1721 * Missing terminating ")" after comment. 1722 * Since 2.16 1723 */ 1724 UNTERMINATED_COMMENT = 118, 1725 /** 1726 * Regular expression too large. 1727 * Since 2.16 1728 */ 1729 EXPRESSION_TOO_LARGE = 120, 1730 /** 1731 * Failed to get memory. Since 2.16 1732 */ 1733 MEMORY_ERROR = 121, 1734 /** 1735 * Lookbehind assertion is not 1736 * fixed length. Since 2.16 1737 */ 1738 VARIABLE_LENGTH_LOOKBEHIND = 125, 1739 /** 1740 * Malformed number or name after "(?(". 1741 * Since 2.16 1742 */ 1743 MALFORMED_CONDITION = 126, 1744 /** 1745 * Conditional group contains 1746 * more than two branches. Since 2.16 1747 */ 1748 TOO_MANY_CONDITIONAL_BRANCHES = 127, 1749 /** 1750 * Assertion expected after "(?(". 1751 * Since 2.16 1752 */ 1753 ASSERTION_EXPECTED = 128, 1754 /** 1755 * Unknown POSIX class name. 1756 * Since 2.16 1757 */ 1758 UNKNOWN_POSIX_CLASS_NAME = 130, 1759 /** 1760 * POSIX collating 1761 * elements are not supported. Since 2.16 1762 */ 1763 POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131, 1764 /** 1765 * Character value in "\\x{...}" sequence 1766 * is too large. Since 2.16 1767 */ 1768 HEX_CODE_TOO_LARGE = 134, 1769 /** 1770 * Invalid condition "(?(0)". Since 2.16 1771 */ 1772 INVALID_CONDITION = 135, 1773 /** 1774 * \\C not allowed in 1775 * lookbehind assertion. Since 2.16 1776 */ 1777 SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136, 1778 /** 1779 * Recursive call could loop indefinitely. 1780 * Since 2.16 1781 */ 1782 INFINITE_LOOP = 140, 1783 /** 1784 * Missing terminator 1785 * in subpattern name. Since 2.16 1786 */ 1787 MISSING_SUBPATTERN_NAME_TERMINATOR = 142, 1788 /** 1789 * Two named subpatterns have 1790 * the same name. Since 2.16 1791 */ 1792 DUPLICATE_SUBPATTERN_NAME = 143, 1793 /** 1794 * Malformed "\\P" or "\\p" sequence. 1795 * Since 2.16 1796 */ 1797 MALFORMED_PROPERTY = 146, 1798 /** 1799 * Unknown property name after "\\P" or 1800 * "\\p". Since 2.16 1801 */ 1802 UNKNOWN_PROPERTY = 147, 1803 /** 1804 * Subpattern name is too long 1805 * (maximum 32 characters). Since 2.16 1806 */ 1807 SUBPATTERN_NAME_TOO_LONG = 148, 1808 /** 1809 * Too many named subpatterns (maximum 1810 * 10,000). Since 2.16 1811 */ 1812 TOO_MANY_SUBPATTERNS = 149, 1813 /** 1814 * Octal value is greater than "\\377". 1815 * Since 2.16 1816 */ 1817 INVALID_OCTAL_VALUE = 151, 1818 /** 1819 * "DEFINE" group contains more 1820 * than one branch. Since 2.16 1821 */ 1822 TOO_MANY_BRANCHES_IN_DEFINE = 154, 1823 /** 1824 * Repeating a "DEFINE" group is not allowed. 1825 * This error is never raised. Since: 2.16 Deprecated: 2.34 1826 */ 1827 DEFINE_REPETION = 155, 1828 /** 1829 * Inconsistent newline options. 1830 * Since 2.16 1831 */ 1832 INCONSISTENT_NEWLINE_OPTIONS = 156, 1833 /** 1834 * "\\g" is not followed by a braced, 1835 * angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16 1836 */ 1837 MISSING_BACK_REFERENCE = 157, 1838 /** 1839 * relative reference must not be zero. Since: 2.34 1840 */ 1841 INVALID_RELATIVE_REFERENCE = 158, 1842 /** 1843 * the backtracing 1844 * control verb used does not allow an argument. Since: 2.34 1845 */ 1846 BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159, 1847 /** 1848 * unknown backtracing 1849 * control verb. Since: 2.34 1850 */ 1851 UNKNOWN_BACKTRACKING_CONTROL_VERB = 160, 1852 /** 1853 * number is too big in escape sequence. Since: 2.34 1854 */ 1855 NUMBER_TOO_BIG = 161, 1856 /** 1857 * Missing subpattern name. Since: 2.34 1858 */ 1859 MISSING_SUBPATTERN_NAME = 162, 1860 /** 1861 * Missing digit. Since 2.34 1862 */ 1863 MISSING_DIGIT = 163, 1864 /** 1865 * In JavaScript compatibility mode, 1866 * "[" is an invalid data character. Since: 2.34 1867 */ 1868 INVALID_DATA_CHARACTER = 164, 1869 /** 1870 * different names for subpatterns of the 1871 * same number are not allowed. Since: 2.34 1872 */ 1873 EXTRA_SUBPATTERN_NAME = 165, 1874 /** 1875 * the backtracing control 1876 * verb requires an argument. Since: 2.34 1877 */ 1878 BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166, 1879 /** 1880 * "\\c" must be followed by an ASCII 1881 * character. Since: 2.34 1882 */ 1883 INVALID_CONTROL_CHAR = 168, 1884 /** 1885 * "\\k" is not followed by a braced, angle-bracketed, or 1886 * quoted name. Since: 2.34 1887 */ 1888 MISSING_NAME = 169, 1889 /** 1890 * "\\N" is not supported in a class. Since: 2.34 1891 */ 1892 NOT_SUPPORTED_IN_CLASS = 171, 1893 /** 1894 * too many forward references. Since: 2.34 1895 */ 1896 TOO_MANY_FORWARD_REFERENCES = 172, 1897 /** 1898 * the name is too long in "(*MARK)", "(*PRUNE)", 1899 * "(*SKIP)", or "(*THEN)". Since: 2.34 1900 */ 1901 NAME_TOO_LONG = 175, 1902 /** 1903 * the character value in the \\u sequence is 1904 * too large. Since: 2.34 1905 */ 1906 CHARACTER_VALUE_TOO_LARGE = 176, 1907 } 1908 alias GRegexError RegexError; 1909 1910 /** 1911 * Flags specifying match-time options. 1912 * 1913 * Since: 2.14 1914 */ 1915 public enum GRegexMatchFlags 1916 { 1917 /** 1918 * The pattern is forced to be "anchored", that is, 1919 * it is constrained to match only at the first matching point in the 1920 * string that is being searched. This effect can also be achieved by 1921 * appropriate constructs in the pattern itself such as the "^" 1922 * metacharacter. 1923 */ 1924 ANCHORED = 16, 1925 /** 1926 * Specifies that first character of the string is 1927 * not the beginning of a line, so the circumflex metacharacter should 1928 * not match before it. Setting this without %G_REGEX_MULTILINE (at 1929 * compile time) causes circumflex never to match. This option affects 1930 * only the behaviour of the circumflex metacharacter, it does not 1931 * affect "\A". 1932 */ 1933 NOTBOL = 128, 1934 /** 1935 * Specifies that the end of the subject string is 1936 * not the end of a line, so the dollar metacharacter should not match 1937 * it nor (except in multiline mode) a newline immediately before it. 1938 * Setting this without %G_REGEX_MULTILINE (at compile time) causes 1939 * dollar never to match. This option affects only the behaviour of 1940 * the dollar metacharacter, it does not affect "\Z" or "\z". 1941 */ 1942 NOTEOL = 256, 1943 /** 1944 * An empty string is not considered to be a valid 1945 * match if this option is set. If there are alternatives in the pattern, 1946 * they are tried. If all the alternatives match the empty string, the 1947 * entire match fails. For example, if the pattern "a?b?" is applied to 1948 * a string not beginning with "a" or "b", it matches the empty string 1949 * at the start of the string. With this flag set, this match is not 1950 * valid, so GRegex searches further into the string for occurrences 1951 * of "a" or "b". 1952 */ 1953 NOTEMPTY = 1024, 1954 /** 1955 * Turns on the partial matching feature, for more 1956 * documentation on partial matching see g_match_info_is_partial_match(). 1957 */ 1958 PARTIAL = 32768, 1959 /** 1960 * Overrides the newline definition set when 1961 * creating a new #GRegex, setting the '\r' character as line terminator. 1962 */ 1963 NEWLINE_CR = 1048576, 1964 /** 1965 * Overrides the newline definition set when 1966 * creating a new #GRegex, setting the '\n' character as line terminator. 1967 */ 1968 NEWLINE_LF = 2097152, 1969 /** 1970 * Overrides the newline definition set when 1971 * creating a new #GRegex, setting the '\r\n' characters sequence as line terminator. 1972 */ 1973 NEWLINE_CRLF = 3145728, 1974 /** 1975 * Overrides the newline definition set when 1976 * creating a new #GRegex, any Unicode newline sequence 1977 * is recognised as a newline. These are '\r', '\n' and '\rn', and the 1978 * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), 1979 * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and 1980 * U+2029 PARAGRAPH SEPARATOR. 1981 */ 1982 NEWLINE_ANY = 4194304, 1983 /** 1984 * Overrides the newline definition set when 1985 * creating a new #GRegex; any '\r', '\n', or '\r\n' character sequence 1986 * is recognized as a newline. Since: 2.34 1987 */ 1988 NEWLINE_ANYCRLF = 5242880, 1989 /** 1990 * Overrides the newline definition for "\R" set when 1991 * creating a new #GRegex; only '\r', '\n', or '\r\n' character sequences 1992 * are recognized as a newline by "\R". Since: 2.34 1993 */ 1994 BSR_ANYCRLF = 8388608, 1995 /** 1996 * Overrides the newline definition for "\R" set when 1997 * creating a new #GRegex; any Unicode newline character or character sequence 1998 * are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the 1999 * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), 2000 * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and 2001 * U+2029 PARAGRAPH SEPARATOR. Since: 2.34 2002 */ 2003 BSR_ANY = 16777216, 2004 /** 2005 * An alias for %G_REGEX_MATCH_PARTIAL. Since: 2.34 2006 */ 2007 PARTIAL_SOFT = 32768, 2008 /** 2009 * Turns on the partial matching feature. In contrast to 2010 * to %G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match 2011 * is found, without continuing to search for a possible complete match. See 2012 * g_match_info_is_partial_match() for more information. Since: 2.34 2013 */ 2014 PARTIAL_HARD = 134217728, 2015 /** 2016 * Like %G_REGEX_MATCH_NOTEMPTY, but only applied to 2017 * the start of the matched string. For anchored 2018 * patterns this can only happen for pattern containing "\K". Since: 2.34 2019 */ 2020 NOTEMPTY_ATSTART = 268435456, 2021 } 2022 alias GRegexMatchFlags RegexMatchFlags; 2023 2024 /** 2025 * An enumeration specifying the base position for a 2026 * g_io_channel_seek_position() operation. 2027 */ 2028 public enum GSeekType 2029 { 2030 /** 2031 * the current position in the file. 2032 */ 2033 CUR = 0, 2034 /** 2035 * the start of the file. 2036 */ 2037 SET = 1, 2038 /** 2039 * the end of the file. 2040 */ 2041 END = 2, 2042 } 2043 alias GSeekType SeekType; 2044 2045 /** 2046 * Error codes returned by shell functions. 2047 */ 2048 public enum GShellError 2049 { 2050 /** 2051 * Mismatched or otherwise mangled quoting. 2052 */ 2053 BAD_QUOTING = 0, 2054 /** 2055 * String to be parsed was empty. 2056 */ 2057 EMPTY_STRING = 1, 2058 /** 2059 * Some other error. 2060 */ 2061 FAILED = 2, 2062 } 2063 alias GShellError ShellError; 2064 2065 public enum GSliceConfig 2066 { 2067 ALWAYS_MALLOC = 1, 2068 BYPASS_MAGAZINES = 2, 2069 WORKING_SET_MSECS = 3, 2070 COLOR_INCREMENT = 4, 2071 CHUNK_SIZES = 5, 2072 CONTENTION_COUNTER = 6, 2073 } 2074 alias GSliceConfig SliceConfig; 2075 2076 /** 2077 * Error codes returned by spawning processes. 2078 */ 2079 public enum GSpawnError 2080 { 2081 /** 2082 * Fork failed due to lack of memory. 2083 */ 2084 FORK = 0, 2085 /** 2086 * Read or select on pipes failed. 2087 */ 2088 READ = 1, 2089 /** 2090 * Changing to working directory failed. 2091 */ 2092 CHDIR = 2, 2093 /** 2094 * execv() returned `EACCES` 2095 */ 2096 ACCES = 3, 2097 /** 2098 * execv() returned `EPERM` 2099 */ 2100 PERM = 4, 2101 /** 2102 * execv() returned `E2BIG` 2103 */ 2104 TOO_BIG = 5, 2105 /** 2106 * execv() returned `ENOEXEC` 2107 */ 2108 NOEXEC = 6, 2109 /** 2110 * execv() returned `ENAMETOOLONG` 2111 */ 2112 NAMETOOLONG = 7, 2113 /** 2114 * execv() returned `ENOENT` 2115 */ 2116 NOENT = 8, 2117 /** 2118 * execv() returned `ENOMEM` 2119 */ 2120 NOMEM = 9, 2121 /** 2122 * execv() returned `ENOTDIR` 2123 */ 2124 NOTDIR = 10, 2125 /** 2126 * execv() returned `ELOOP` 2127 */ 2128 LOOP = 11, 2129 /** 2130 * execv() returned `ETXTBUSY` 2131 */ 2132 TXTBUSY = 12, 2133 /** 2134 * execv() returned `EIO` 2135 */ 2136 IO = 13, 2137 /** 2138 * execv() returned `ENFILE` 2139 */ 2140 NFILE = 14, 2141 /** 2142 * execv() returned `EMFILE` 2143 */ 2144 MFILE = 15, 2145 /** 2146 * execv() returned `EINVAL` 2147 */ 2148 INVAL = 16, 2149 /** 2150 * execv() returned `EISDIR` 2151 */ 2152 ISDIR = 17, 2153 /** 2154 * execv() returned `ELIBBAD` 2155 */ 2156 LIBBAD = 18, 2157 /** 2158 * Some other fatal failure, 2159 * `error->message` should explain. 2160 */ 2161 FAILED = 19, 2162 } 2163 alias GSpawnError SpawnError; 2164 2165 /** 2166 * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). 2167 */ 2168 public enum GSpawnFlags 2169 { 2170 /** 2171 * no flags, default behaviour 2172 */ 2173 DEFAULT = 0, 2174 /** 2175 * the parent's open file descriptors will 2176 * be inherited by the child; otherwise all descriptors except stdin, 2177 * stdout and stderr will be closed before calling exec() in the child. 2178 */ 2179 LEAVE_DESCRIPTORS_OPEN = 1, 2180 /** 2181 * the child will not be automatically reaped; 2182 * you must use g_child_watch_add() yourself (or call waitpid() or handle 2183 * `SIGCHLD` yourself), or the child will become a zombie. 2184 */ 2185 DO_NOT_REAP_CHILD = 2, 2186 /** 2187 * `argv[0]` need not be an absolute path, it will be 2188 * looked for in the user's `PATH`. 2189 */ 2190 SEARCH_PATH = 4, 2191 /** 2192 * the child's standard output will be discarded, 2193 * instead of going to the same location as the parent's standard output. 2194 */ 2195 STDOUT_TO_DEV_NULL = 8, 2196 /** 2197 * the child's standard error will be discarded. 2198 */ 2199 STDERR_TO_DEV_NULL = 16, 2200 /** 2201 * the child will inherit the parent's standard 2202 * input (by default, the child's standard input is attached to `/dev/null`). 2203 */ 2204 CHILD_INHERITS_STDIN = 32, 2205 /** 2206 * the first element of `argv` is the file to 2207 * execute, while the remaining elements are the actual argument vector 2208 * to pass to the file. Normally g_spawn_async_with_pipes() uses `argv[0]` 2209 * as the file to execute, and passes all of `argv` to the child. 2210 */ 2211 FILE_AND_ARGV_ZERO = 64, 2212 /** 2213 * if `argv[0]` is not an absolute path, 2214 * it will be looked for in the `PATH` from the passed child environment. 2215 * Since: 2.34 2216 */ 2217 SEARCH_PATH_FROM_ENVP = 128, 2218 /** 2219 * create all pipes with the `O_CLOEXEC` flag set. 2220 * Since: 2.40 2221 */ 2222 CLOEXEC_PIPES = 256, 2223 } 2224 alias GSpawnFlags SpawnFlags; 2225 2226 /** 2227 * The type of file to return the filename for, when used with 2228 * g_test_build_filename(). 2229 * 2230 * These two options correspond rather directly to the 'dist' and 2231 * 'built' terminology that automake uses and are explicitly used to 2232 * distinguish between the 'srcdir' and 'builddir' being separate. All 2233 * files in your project should either be dist (in the 2234 * `EXTRA_DIST` or `dist_schema_DATA` 2235 * sense, in which case they will always be in the srcdir) or built (in 2236 * the `BUILT_SOURCES` sense, in which case they will 2237 * always be in the builddir). 2238 * 2239 * Note: as a general rule of automake, files that are generated only as 2240 * part of the build-from-git process (but then are distributed with the 2241 * tarball) always go in srcdir (even if doing a srcdir != builddir 2242 * build from git) and are considered as distributed files. 2243 * 2244 * Since: 2.38 2245 */ 2246 public enum GTestFileType 2247 { 2248 /** 2249 * a file that was included in the distribution tarball 2250 */ 2251 DIST = 0, 2252 /** 2253 * a file that was built on the compiling machine 2254 */ 2255 BUILT = 1, 2256 } 2257 alias GTestFileType TestFileType; 2258 2259 public enum GTestLogType 2260 { 2261 NONE = 0, 2262 ERROR = 1, 2263 START_BINARY = 2, 2264 LIST_CASE = 3, 2265 SKIP_CASE = 4, 2266 START_CASE = 5, 2267 STOP_CASE = 6, 2268 MIN_RESULT = 7, 2269 MAX_RESULT = 8, 2270 MESSAGE = 9, 2271 START_SUITE = 10, 2272 STOP_SUITE = 11, 2273 } 2274 alias GTestLogType TestLogType; 2275 2276 public enum GTestResult 2277 { 2278 SUCCESS = 0, 2279 SKIPPED = 1, 2280 FAILURE = 2, 2281 INCOMPLETE = 3, 2282 } 2283 alias GTestResult TestResult; 2284 2285 /** 2286 * Flags to pass to g_test_trap_subprocess() to control input and output. 2287 * 2288 * Note that in contrast with g_test_trap_fork(), the default is to 2289 * not show stdout and stderr. 2290 */ 2291 public enum GTestSubprocessFlags 2292 { 2293 /** 2294 * If this flag is given, the child 2295 * process will inherit the parent's stdin. Otherwise, the child's 2296 * stdin is redirected to `/dev/null`. 2297 */ 2298 STDIN = 1, 2299 /** 2300 * If this flag is given, the child 2301 * process will inherit the parent's stdout. Otherwise, the child's 2302 * stdout will not be visible, but it will be captured to allow 2303 * later tests with g_test_trap_assert_stdout(). 2304 */ 2305 STDOUT = 2, 2306 /** 2307 * If this flag is given, the child 2308 * process will inherit the parent's stderr. Otherwise, the child's 2309 * stderr will not be visible, but it will be captured to allow 2310 * later tests with g_test_trap_assert_stderr(). 2311 */ 2312 STDERR = 4, 2313 } 2314 alias GTestSubprocessFlags TestSubprocessFlags; 2315 2316 /** 2317 * Test traps are guards around forked tests. 2318 * These flags determine what traps to set. 2319 * 2320 * Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(), 2321 * which is deprecated. g_test_trap_subprocess() uses 2322 * #GTestSubprocessFlags. 2323 */ 2324 public enum GTestTrapFlags 2325 { 2326 /** 2327 * Redirect stdout of the test child to 2328 * `/dev/null` so it cannot be observed on the console during test 2329 * runs. The actual output is still captured though to allow later 2330 * tests with g_test_trap_assert_stdout(). 2331 */ 2332 SILENCE_STDOUT = 128, 2333 /** 2334 * Redirect stderr of the test child to 2335 * `/dev/null` so it cannot be observed on the console during test 2336 * runs. The actual output is still captured though to allow later 2337 * tests with g_test_trap_assert_stderr(). 2338 */ 2339 SILENCE_STDERR = 256, 2340 /** 2341 * If this flag is given, stdin of the 2342 * child process is shared with stdin of its parent process. 2343 * It is redirected to `/dev/null` otherwise. 2344 */ 2345 INHERIT_STDIN = 512, 2346 } 2347 alias GTestTrapFlags TestTrapFlags; 2348 2349 /** 2350 * Possible errors of thread related functions. 2351 */ 2352 public enum GThreadError 2353 { 2354 /** 2355 * a thread couldn't be created due to resource 2356 * shortage. Try again later. 2357 */ 2358 THREAD_ERROR_AGAIN = 0, 2359 } 2360 alias GThreadError ThreadError; 2361 2362 /** 2363 * Disambiguates a given time in two ways. 2364 * 2365 * First, specifies if the given time is in universal or local time. 2366 * 2367 * Second, if the time is in local time, specifies if it is local 2368 * standard time or local daylight time. This is important for the case 2369 * where the same local time occurs twice (during daylight savings time 2370 * transitions, for example). 2371 */ 2372 public enum GTimeType 2373 { 2374 /** 2375 * the time is in local standard time 2376 */ 2377 STANDARD = 0, 2378 /** 2379 * the time is in local daylight time 2380 */ 2381 DAYLIGHT = 1, 2382 /** 2383 * the time is in UTC 2384 */ 2385 UNIVERSAL = 2, 2386 } 2387 alias GTimeType TimeType; 2388 2389 /** 2390 * The possible types of token returned from each 2391 * g_scanner_get_next_token() call. 2392 */ 2393 public enum GTokenType 2394 { 2395 /** 2396 * the end of the file 2397 */ 2398 EOF = 0, 2399 /** 2400 * a '(' character 2401 */ 2402 LEFT_PAREN = 40, 2403 /** 2404 * a ')' character 2405 */ 2406 RIGHT_PAREN = 41, 2407 /** 2408 * a '{' character 2409 */ 2410 LEFT_CURLY = 123, 2411 /** 2412 * a '}' character 2413 */ 2414 RIGHT_CURLY = 125, 2415 /** 2416 * a '[' character 2417 */ 2418 LEFT_BRACE = 91, 2419 /** 2420 * a ']' character 2421 */ 2422 RIGHT_BRACE = 93, 2423 /** 2424 * a '=' character 2425 */ 2426 EQUAL_SIGN = 61, 2427 /** 2428 * a ',' character 2429 */ 2430 COMMA = 44, 2431 /** 2432 * not a token 2433 */ 2434 NONE = 256, 2435 /** 2436 * an error occurred 2437 */ 2438 ERROR = 257, 2439 /** 2440 * a character 2441 */ 2442 CHAR = 258, 2443 /** 2444 * a binary integer 2445 */ 2446 BINARY = 259, 2447 /** 2448 * an octal integer 2449 */ 2450 OCTAL = 260, 2451 /** 2452 * an integer 2453 */ 2454 INT = 261, 2455 /** 2456 * a hex integer 2457 */ 2458 HEX = 262, 2459 /** 2460 * a floating point number 2461 */ 2462 FLOAT = 263, 2463 /** 2464 * a string 2465 */ 2466 STRING = 264, 2467 /** 2468 * a symbol 2469 */ 2470 SYMBOL = 265, 2471 /** 2472 * an identifier 2473 */ 2474 IDENTIFIER = 266, 2475 /** 2476 * a null identifier 2477 */ 2478 IDENTIFIER_NULL = 267, 2479 /** 2480 * one line comment 2481 */ 2482 COMMENT_SINGLE = 268, 2483 /** 2484 * multi line comment 2485 */ 2486 COMMENT_MULTI = 269, 2487 } 2488 alias GTokenType TokenType; 2489 2490 /** 2491 * Specifies which nodes are visited during several of the tree 2492 * functions, including g_node_traverse() and g_node_find(). 2493 */ 2494 public enum GTraverseFlags 2495 { 2496 /** 2497 * only leaf nodes should be visited. This name has 2498 * been introduced in 2.6, for older version use 2499 * %G_TRAVERSE_LEAFS. 2500 */ 2501 LEAVES = 1, 2502 /** 2503 * only non-leaf nodes should be visited. This 2504 * name has been introduced in 2.6, for older 2505 * version use %G_TRAVERSE_NON_LEAFS. 2506 */ 2507 NON_LEAVES = 2, 2508 /** 2509 * all nodes should be visited. 2510 */ 2511 ALL = 3, 2512 /** 2513 * a mask of all traverse flags. 2514 */ 2515 MASK = 3, 2516 /** 2517 * identical to %G_TRAVERSE_LEAVES. 2518 */ 2519 LEAFS = 1, 2520 /** 2521 * identical to %G_TRAVERSE_NON_LEAVES. 2522 */ 2523 NON_LEAFS = 2, 2524 } 2525 alias GTraverseFlags TraverseFlags; 2526 2527 /** 2528 * Specifies the type of traversal performed by g_tree_traverse(), 2529 * g_node_traverse() and g_node_find(). The different orders are 2530 * illustrated here: 2531 * - In order: A, B, C, D, E, F, G, H, I 2532 *  2533 * - Pre order: F, B, A, D, C, E, G, I, H 2534 *  2535 * - Post order: A, C, E, D, B, H, I, G, F 2536 *  2537 * - Level order: F, B, G, A, D, I, C, E, H 2538 *  2539 */ 2540 public enum GTraverseType 2541 { 2542 /** 2543 * vists a node's left child first, then the node itself, 2544 * then its right child. This is the one to use if you 2545 * want the output sorted according to the compare 2546 * function. 2547 */ 2548 IN_ORDER = 0, 2549 /** 2550 * visits a node, then its children. 2551 */ 2552 PRE_ORDER = 1, 2553 /** 2554 * visits the node's children, then the node itself. 2555 */ 2556 POST_ORDER = 2, 2557 /** 2558 * is not implemented for 2559 * [balanced binary trees][glib-Balanced-Binary-Trees]. 2560 * For [n-ary trees][glib-N-ary-Trees], it 2561 * vists the root node first, then its children, then 2562 * its grandchildren, and so on. Note that this is less 2563 * efficient than the other orders. 2564 */ 2565 LEVEL_ORDER = 3, 2566 } 2567 alias GTraverseType TraverseType; 2568 2569 /** 2570 * These are the possible line break classifications. 2571 * 2572 * Since new unicode versions may add new types here, applications should be ready 2573 * to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN. 2574 * 2575 * See [Unicode Line Breaking Algorithm](http://www.unicode.org/unicode/reports/tr14/). 2576 */ 2577 public enum GUnicodeBreakType 2578 { 2579 /** 2580 * Mandatory Break (BK) 2581 */ 2582 MANDATORY = 0, 2583 /** 2584 * Carriage Return (CR) 2585 */ 2586 CARRIAGE_RETURN = 1, 2587 /** 2588 * Line Feed (LF) 2589 */ 2590 LINE_FEED = 2, 2591 /** 2592 * Attached Characters and Combining Marks (CM) 2593 */ 2594 COMBINING_MARK = 3, 2595 /** 2596 * Surrogates (SG) 2597 */ 2598 SURROGATE = 4, 2599 /** 2600 * Zero Width Space (ZW) 2601 */ 2602 ZERO_WIDTH_SPACE = 5, 2603 /** 2604 * Inseparable (IN) 2605 */ 2606 INSEPARABLE = 6, 2607 /** 2608 * Non-breaking ("Glue") (GL) 2609 */ 2610 NON_BREAKING_GLUE = 7, 2611 /** 2612 * Contingent Break Opportunity (CB) 2613 */ 2614 CONTINGENT = 8, 2615 /** 2616 * Space (SP) 2617 */ 2618 SPACE = 9, 2619 /** 2620 * Break Opportunity After (BA) 2621 */ 2622 AFTER = 10, 2623 /** 2624 * Break Opportunity Before (BB) 2625 */ 2626 BEFORE = 11, 2627 /** 2628 * Break Opportunity Before and After (B2) 2629 */ 2630 BEFORE_AND_AFTER = 12, 2631 /** 2632 * Hyphen (HY) 2633 */ 2634 HYPHEN = 13, 2635 /** 2636 * Nonstarter (NS) 2637 */ 2638 NON_STARTER = 14, 2639 /** 2640 * Opening Punctuation (OP) 2641 */ 2642 OPEN_PUNCTUATION = 15, 2643 /** 2644 * Closing Punctuation (CL) 2645 */ 2646 CLOSE_PUNCTUATION = 16, 2647 /** 2648 * Ambiguous Quotation (QU) 2649 */ 2650 QUOTATION = 17, 2651 /** 2652 * Exclamation/Interrogation (EX) 2653 */ 2654 EXCLAMATION = 18, 2655 /** 2656 * Ideographic (ID) 2657 */ 2658 IDEOGRAPHIC = 19, 2659 /** 2660 * Numeric (NU) 2661 */ 2662 NUMERIC = 20, 2663 /** 2664 * Infix Separator (Numeric) (IS) 2665 */ 2666 INFIX_SEPARATOR = 21, 2667 /** 2668 * Symbols Allowing Break After (SY) 2669 */ 2670 SYMBOL = 22, 2671 /** 2672 * Ordinary Alphabetic and Symbol Characters (AL) 2673 */ 2674 ALPHABETIC = 23, 2675 /** 2676 * Prefix (Numeric) (PR) 2677 */ 2678 PREFIX = 24, 2679 /** 2680 * Postfix (Numeric) (PO) 2681 */ 2682 POSTFIX = 25, 2683 /** 2684 * Complex Content Dependent (South East Asian) (SA) 2685 */ 2686 COMPLEX_CONTEXT = 26, 2687 /** 2688 * Ambiguous (Alphabetic or Ideographic) (AI) 2689 */ 2690 AMBIGUOUS = 27, 2691 /** 2692 * Unknown (XX) 2693 */ 2694 UNKNOWN = 28, 2695 /** 2696 * Next Line (NL) 2697 */ 2698 NEXT_LINE = 29, 2699 /** 2700 * Word Joiner (WJ) 2701 */ 2702 WORD_JOINER = 30, 2703 /** 2704 * Hangul L Jamo (JL) 2705 */ 2706 HANGUL_L_JAMO = 31, 2707 /** 2708 * Hangul V Jamo (JV) 2709 */ 2710 HANGUL_V_JAMO = 32, 2711 /** 2712 * Hangul T Jamo (JT) 2713 */ 2714 HANGUL_T_JAMO = 33, 2715 /** 2716 * Hangul LV Syllable (H2) 2717 */ 2718 HANGUL_LV_SYLLABLE = 34, 2719 /** 2720 * Hangul LVT Syllable (H3) 2721 */ 2722 HANGUL_LVT_SYLLABLE = 35, 2723 /** 2724 * Closing Parenthesis (CP). Since 2.28. Deprecated: 2.70: Use %G_UNICODE_BREAK_CLOSE_PARENTHESIS instead. 2725 */ 2726 CLOSE_PARANTHESIS = 36, 2727 /** 2728 * Closing Parenthesis (CP). Since 2.70 2729 */ 2730 CLOSE_PARENTHESIS = 36, 2731 /** 2732 * Conditional Japanese Starter (CJ). Since: 2.32 2733 */ 2734 CONDITIONAL_JAPANESE_STARTER = 37, 2735 /** 2736 * Hebrew Letter (HL). Since: 2.32 2737 */ 2738 HEBREW_LETTER = 38, 2739 /** 2740 * Regional Indicator (RI). Since: 2.36 2741 */ 2742 REGIONAL_INDICATOR = 39, 2743 /** 2744 * Emoji Base (EB). Since: 2.50 2745 */ 2746 EMOJI_BASE = 40, 2747 /** 2748 * Emoji Modifier (EM). Since: 2.50 2749 */ 2750 EMOJI_MODIFIER = 41, 2751 /** 2752 * Zero Width Joiner (ZWJ). Since: 2.50 2753 */ 2754 ZERO_WIDTH_JOINER = 42, 2755 } 2756 alias GUnicodeBreakType UnicodeBreakType; 2757 2758 /** 2759 * The #GUnicodeScript enumeration identifies different writing 2760 * systems. The values correspond to the names as defined in the 2761 * Unicode standard. The enumeration has been added in GLib 2.14, 2762 * and is interchangeable with #PangoScript. 2763 * 2764 * Note that new types may be added in the future. Applications 2765 * should be ready to handle unknown values. 2766 * See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr24/). 2767 */ 2768 public enum GUnicodeScript 2769 { 2770 /** 2771 * a value never returned from g_unichar_get_script() 2772 */ 2773 INVALID_CODE = -1, 2774 /** 2775 * a character used by multiple different scripts 2776 */ 2777 COMMON = 0, 2778 /** 2779 * a mark glyph that takes its script from the 2780 * base glyph to which it is attached 2781 */ 2782 INHERITED = 1, 2783 /** 2784 * Arabic 2785 */ 2786 ARABIC = 2, 2787 /** 2788 * Armenian 2789 */ 2790 ARMENIAN = 3, 2791 /** 2792 * Bengali 2793 */ 2794 BENGALI = 4, 2795 /** 2796 * Bopomofo 2797 */ 2798 BOPOMOFO = 5, 2799 /** 2800 * Cherokee 2801 */ 2802 CHEROKEE = 6, 2803 /** 2804 * Coptic 2805 */ 2806 COPTIC = 7, 2807 /** 2808 * Cyrillic 2809 */ 2810 CYRILLIC = 8, 2811 /** 2812 * Deseret 2813 */ 2814 DESERET = 9, 2815 /** 2816 * Devanagari 2817 */ 2818 DEVANAGARI = 10, 2819 /** 2820 * Ethiopic 2821 */ 2822 ETHIOPIC = 11, 2823 /** 2824 * Georgian 2825 */ 2826 GEORGIAN = 12, 2827 /** 2828 * Gothic 2829 */ 2830 GOTHIC = 13, 2831 /** 2832 * Greek 2833 */ 2834 GREEK = 14, 2835 /** 2836 * Gujarati 2837 */ 2838 GUJARATI = 15, 2839 /** 2840 * Gurmukhi 2841 */ 2842 GURMUKHI = 16, 2843 /** 2844 * Han 2845 */ 2846 HAN = 17, 2847 /** 2848 * Hangul 2849 */ 2850 HANGUL = 18, 2851 /** 2852 * Hebrew 2853 */ 2854 HEBREW = 19, 2855 /** 2856 * Hiragana 2857 */ 2858 HIRAGANA = 20, 2859 /** 2860 * Kannada 2861 */ 2862 KANNADA = 21, 2863 /** 2864 * Katakana 2865 */ 2866 KATAKANA = 22, 2867 /** 2868 * Khmer 2869 */ 2870 KHMER = 23, 2871 /** 2872 * Lao 2873 */ 2874 LAO = 24, 2875 /** 2876 * Latin 2877 */ 2878 LATIN = 25, 2879 /** 2880 * Malayalam 2881 */ 2882 MALAYALAM = 26, 2883 /** 2884 * Mongolian 2885 */ 2886 MONGOLIAN = 27, 2887 /** 2888 * Myanmar 2889 */ 2890 MYANMAR = 28, 2891 /** 2892 * Ogham 2893 */ 2894 OGHAM = 29, 2895 /** 2896 * Old Italic 2897 */ 2898 OLD_ITALIC = 30, 2899 /** 2900 * Oriya 2901 */ 2902 ORIYA = 31, 2903 /** 2904 * Runic 2905 */ 2906 RUNIC = 32, 2907 /** 2908 * Sinhala 2909 */ 2910 SINHALA = 33, 2911 /** 2912 * Syriac 2913 */ 2914 SYRIAC = 34, 2915 /** 2916 * Tamil 2917 */ 2918 TAMIL = 35, 2919 /** 2920 * Telugu 2921 */ 2922 TELUGU = 36, 2923 /** 2924 * Thaana 2925 */ 2926 THAANA = 37, 2927 /** 2928 * Thai 2929 */ 2930 THAI = 38, 2931 /** 2932 * Tibetan 2933 */ 2934 TIBETAN = 39, 2935 /** 2936 * Canadian Aboriginal 2937 */ 2938 CANADIAN_ABORIGINAL = 40, 2939 /** 2940 * Yi 2941 */ 2942 YI = 41, 2943 /** 2944 * Tagalog 2945 */ 2946 TAGALOG = 42, 2947 /** 2948 * Hanunoo 2949 */ 2950 HANUNOO = 43, 2951 /** 2952 * Buhid 2953 */ 2954 BUHID = 44, 2955 /** 2956 * Tagbanwa 2957 */ 2958 TAGBANWA = 45, 2959 /** 2960 * Braille 2961 */ 2962 BRAILLE = 46, 2963 /** 2964 * Cypriot 2965 */ 2966 CYPRIOT = 47, 2967 /** 2968 * Limbu 2969 */ 2970 LIMBU = 48, 2971 /** 2972 * Osmanya 2973 */ 2974 OSMANYA = 49, 2975 /** 2976 * Shavian 2977 */ 2978 SHAVIAN = 50, 2979 /** 2980 * Linear B 2981 */ 2982 LINEAR_B = 51, 2983 /** 2984 * Tai Le 2985 */ 2986 TAI_LE = 52, 2987 /** 2988 * Ugaritic 2989 */ 2990 UGARITIC = 53, 2991 /** 2992 * New Tai Lue 2993 */ 2994 NEW_TAI_LUE = 54, 2995 /** 2996 * Buginese 2997 */ 2998 BUGINESE = 55, 2999 /** 3000 * Glagolitic 3001 */ 3002 GLAGOLITIC = 56, 3003 /** 3004 * Tifinagh 3005 */ 3006 TIFINAGH = 57, 3007 /** 3008 * Syloti Nagri 3009 */ 3010 SYLOTI_NAGRI = 58, 3011 /** 3012 * Old Persian 3013 */ 3014 OLD_PERSIAN = 59, 3015 /** 3016 * Kharoshthi 3017 */ 3018 KHAROSHTHI = 60, 3019 /** 3020 * an unassigned code point 3021 */ 3022 UNKNOWN = 61, 3023 /** 3024 * Balinese 3025 */ 3026 BALINESE = 62, 3027 /** 3028 * Cuneiform 3029 */ 3030 CUNEIFORM = 63, 3031 /** 3032 * Phoenician 3033 */ 3034 PHOENICIAN = 64, 3035 /** 3036 * Phags-pa 3037 */ 3038 PHAGS_PA = 65, 3039 /** 3040 * N'Ko 3041 */ 3042 NKO = 66, 3043 /** 3044 * Kayah Li. Since 2.16.3 3045 */ 3046 KAYAH_LI = 67, 3047 /** 3048 * Lepcha. Since 2.16.3 3049 */ 3050 LEPCHA = 68, 3051 /** 3052 * Rejang. Since 2.16.3 3053 */ 3054 REJANG = 69, 3055 /** 3056 * Sundanese. Since 2.16.3 3057 */ 3058 SUNDANESE = 70, 3059 /** 3060 * Saurashtra. Since 2.16.3 3061 */ 3062 SAURASHTRA = 71, 3063 /** 3064 * Cham. Since 2.16.3 3065 */ 3066 CHAM = 72, 3067 /** 3068 * Ol Chiki. Since 2.16.3 3069 */ 3070 OL_CHIKI = 73, 3071 /** 3072 * Vai. Since 2.16.3 3073 */ 3074 VAI = 74, 3075 /** 3076 * Carian. Since 2.16.3 3077 */ 3078 CARIAN = 75, 3079 /** 3080 * Lycian. Since 2.16.3 3081 */ 3082 LYCIAN = 76, 3083 /** 3084 * Lydian. Since 2.16.3 3085 */ 3086 LYDIAN = 77, 3087 /** 3088 * Avestan. Since 2.26 3089 */ 3090 AVESTAN = 78, 3091 /** 3092 * Bamum. Since 2.26 3093 */ 3094 BAMUM = 79, 3095 /** 3096 * Egyptian Hieroglpyhs. Since 2.26 3097 */ 3098 EGYPTIAN_HIEROGLYPHS = 80, 3099 /** 3100 * Imperial Aramaic. Since 2.26 3101 */ 3102 IMPERIAL_ARAMAIC = 81, 3103 /** 3104 * Inscriptional Pahlavi. Since 2.26 3105 */ 3106 INSCRIPTIONAL_PAHLAVI = 82, 3107 /** 3108 * Inscriptional Parthian. Since 2.26 3109 */ 3110 INSCRIPTIONAL_PARTHIAN = 83, 3111 /** 3112 * Javanese. Since 2.26 3113 */ 3114 JAVANESE = 84, 3115 /** 3116 * Kaithi. Since 2.26 3117 */ 3118 KAITHI = 85, 3119 /** 3120 * Lisu. Since 2.26 3121 */ 3122 LISU = 86, 3123 /** 3124 * Meetei Mayek. Since 2.26 3125 */ 3126 MEETEI_MAYEK = 87, 3127 /** 3128 * Old South Arabian. Since 2.26 3129 */ 3130 OLD_SOUTH_ARABIAN = 88, 3131 /** 3132 * Old Turkic. Since 2.28 3133 */ 3134 OLD_TURKIC = 89, 3135 /** 3136 * Samaritan. Since 2.26 3137 */ 3138 SAMARITAN = 90, 3139 /** 3140 * Tai Tham. Since 2.26 3141 */ 3142 TAI_THAM = 91, 3143 /** 3144 * Tai Viet. Since 2.26 3145 */ 3146 TAI_VIET = 92, 3147 /** 3148 * Batak. Since 2.28 3149 */ 3150 BATAK = 93, 3151 /** 3152 * Brahmi. Since 2.28 3153 */ 3154 BRAHMI = 94, 3155 /** 3156 * Mandaic. Since 2.28 3157 */ 3158 MANDAIC = 95, 3159 /** 3160 * Chakma. Since: 2.32 3161 */ 3162 CHAKMA = 96, 3163 /** 3164 * Meroitic Cursive. Since: 2.32 3165 */ 3166 MEROITIC_CURSIVE = 97, 3167 /** 3168 * Meroitic Hieroglyphs. Since: 2.32 3169 */ 3170 MEROITIC_HIEROGLYPHS = 98, 3171 /** 3172 * Miao. Since: 2.32 3173 */ 3174 MIAO = 99, 3175 /** 3176 * Sharada. Since: 2.32 3177 */ 3178 SHARADA = 100, 3179 /** 3180 * Sora Sompeng. Since: 2.32 3181 */ 3182 SORA_SOMPENG = 101, 3183 /** 3184 * Takri. Since: 2.32 3185 */ 3186 TAKRI = 102, 3187 /** 3188 * Bassa. Since: 2.42 3189 */ 3190 BASSA_VAH = 103, 3191 /** 3192 * Caucasian Albanian. Since: 2.42 3193 */ 3194 CAUCASIAN_ALBANIAN = 104, 3195 /** 3196 * Duployan. Since: 2.42 3197 */ 3198 DUPLOYAN = 105, 3199 /** 3200 * Elbasan. Since: 2.42 3201 */ 3202 ELBASAN = 106, 3203 /** 3204 * Grantha. Since: 2.42 3205 */ 3206 GRANTHA = 107, 3207 /** 3208 * Kjohki. Since: 2.42 3209 */ 3210 KHOJKI = 108, 3211 /** 3212 * Khudawadi, Sindhi. Since: 2.42 3213 */ 3214 KHUDAWADI = 109, 3215 /** 3216 * Linear A. Since: 2.42 3217 */ 3218 LINEAR_A = 110, 3219 /** 3220 * Mahajani. Since: 2.42 3221 */ 3222 MAHAJANI = 111, 3223 /** 3224 * Manichaean. Since: 2.42 3225 */ 3226 MANICHAEAN = 112, 3227 /** 3228 * Mende Kikakui. Since: 2.42 3229 */ 3230 MENDE_KIKAKUI = 113, 3231 /** 3232 * Modi. Since: 2.42 3233 */ 3234 MODI = 114, 3235 /** 3236 * Mro. Since: 2.42 3237 */ 3238 MRO = 115, 3239 /** 3240 * Nabataean. Since: 2.42 3241 */ 3242 NABATAEAN = 116, 3243 /** 3244 * Old North Arabian. Since: 2.42 3245 */ 3246 OLD_NORTH_ARABIAN = 117, 3247 /** 3248 * Old Permic. Since: 2.42 3249 */ 3250 OLD_PERMIC = 118, 3251 /** 3252 * Pahawh Hmong. Since: 2.42 3253 */ 3254 PAHAWH_HMONG = 119, 3255 /** 3256 * Palmyrene. Since: 2.42 3257 */ 3258 PALMYRENE = 120, 3259 /** 3260 * Pau Cin Hau. Since: 2.42 3261 */ 3262 PAU_CIN_HAU = 121, 3263 /** 3264 * Psalter Pahlavi. Since: 2.42 3265 */ 3266 PSALTER_PAHLAVI = 122, 3267 /** 3268 * Siddham. Since: 2.42 3269 */ 3270 SIDDHAM = 123, 3271 /** 3272 * Tirhuta. Since: 2.42 3273 */ 3274 TIRHUTA = 124, 3275 /** 3276 * Warang Citi. Since: 2.42 3277 */ 3278 WARANG_CITI = 125, 3279 /** 3280 * Ahom. Since: 2.48 3281 */ 3282 AHOM = 126, 3283 /** 3284 * Anatolian Hieroglyphs. Since: 2.48 3285 */ 3286 ANATOLIAN_HIEROGLYPHS = 127, 3287 /** 3288 * Hatran. Since: 2.48 3289 */ 3290 HATRAN = 128, 3291 /** 3292 * Multani. Since: 2.48 3293 */ 3294 MULTANI = 129, 3295 /** 3296 * Old Hungarian. Since: 2.48 3297 */ 3298 OLD_HUNGARIAN = 130, 3299 /** 3300 * Signwriting. Since: 2.48 3301 */ 3302 SIGNWRITING = 131, 3303 /** 3304 * Adlam. Since: 2.50 3305 */ 3306 ADLAM = 132, 3307 /** 3308 * Bhaiksuki. Since: 2.50 3309 */ 3310 BHAIKSUKI = 133, 3311 /** 3312 * Marchen. Since: 2.50 3313 */ 3314 MARCHEN = 134, 3315 /** 3316 * Newa. Since: 2.50 3317 */ 3318 NEWA = 135, 3319 /** 3320 * Osage. Since: 2.50 3321 */ 3322 OSAGE = 136, 3323 /** 3324 * Tangut. Since: 2.50 3325 */ 3326 TANGUT = 137, 3327 /** 3328 * Masaram Gondi. Since: 2.54 3329 */ 3330 MASARAM_GONDI = 138, 3331 /** 3332 * Nushu. Since: 2.54 3333 */ 3334 NUSHU = 139, 3335 /** 3336 * Soyombo. Since: 2.54 3337 */ 3338 SOYOMBO = 140, 3339 /** 3340 * Zanabazar Square. Since: 2.54 3341 */ 3342 ZANABAZAR_SQUARE = 141, 3343 /** 3344 * Dogra. Since: 2.58 3345 */ 3346 DOGRA = 142, 3347 /** 3348 * Gunjala Gondi. Since: 2.58 3349 */ 3350 GUNJALA_GONDI = 143, 3351 /** 3352 * Hanifi Rohingya. Since: 2.58 3353 */ 3354 HANIFI_ROHINGYA = 144, 3355 /** 3356 * Makasar. Since: 2.58 3357 */ 3358 MAKASAR = 145, 3359 /** 3360 * Medefaidrin. Since: 2.58 3361 */ 3362 MEDEFAIDRIN = 146, 3363 /** 3364 * Old Sogdian. Since: 2.58 3365 */ 3366 OLD_SOGDIAN = 147, 3367 /** 3368 * Sogdian. Since: 2.58 3369 */ 3370 SOGDIAN = 148, 3371 /** 3372 * Elym. Since: 2.62 3373 */ 3374 ELYMAIC = 149, 3375 /** 3376 * Nand. Since: 2.62 3377 */ 3378 NANDINAGARI = 150, 3379 /** 3380 * Rohg. Since: 2.62 3381 */ 3382 NYIAKENG_PUACHUE_HMONG = 151, 3383 /** 3384 * Wcho. Since: 2.62 3385 */ 3386 WANCHO = 152, 3387 /** 3388 * Chorasmian. Since: 2.66 3389 */ 3390 CHORASMIAN = 153, 3391 /** 3392 * Dives Akuru. Since: 2.66 3393 */ 3394 DIVES_AKURU = 154, 3395 /** 3396 * Khitan small script. Since: 2.66 3397 */ 3398 KHITAN_SMALL_SCRIPT = 155, 3399 /** 3400 * Yezidi. Since: 2.66 3401 */ 3402 YEZIDI = 156, 3403 /** 3404 * Cypro-Minoan. Since: 2.72 3405 */ 3406 CYPRO_MINOAN = 157, 3407 /** 3408 * Old Uyghur. Since: 2.72 3409 */ 3410 OLD_UYGHUR = 158, 3411 /** 3412 * Tangsa. Since: 2.72 3413 */ 3414 TANGSA = 159, 3415 /** 3416 * Toto. Since: 2.72 3417 */ 3418 TOTO = 160, 3419 /** 3420 * Vithkuqi. Since: 2.72 3421 */ 3422 VITHKUQI = 161, 3423 /** 3424 * Mathematical notation. Since: 2.72 3425 */ 3426 MATH = 162, 3427 } 3428 alias GUnicodeScript UnicodeScript; 3429 3430 /** 3431 * These are the possible character classifications from the 3432 * Unicode specification. 3433 * See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values). 3434 */ 3435 public enum GUnicodeType 3436 { 3437 /** 3438 * General category "Other, Control" (Cc) 3439 */ 3440 CONTROL = 0, 3441 /** 3442 * General category "Other, Format" (Cf) 3443 */ 3444 FORMAT = 1, 3445 /** 3446 * General category "Other, Not Assigned" (Cn) 3447 */ 3448 UNASSIGNED = 2, 3449 /** 3450 * General category "Other, Private Use" (Co) 3451 */ 3452 PRIVATE_USE = 3, 3453 /** 3454 * General category "Other, Surrogate" (Cs) 3455 */ 3456 SURROGATE = 4, 3457 /** 3458 * General category "Letter, Lowercase" (Ll) 3459 */ 3460 LOWERCASE_LETTER = 5, 3461 /** 3462 * General category "Letter, Modifier" (Lm) 3463 */ 3464 MODIFIER_LETTER = 6, 3465 /** 3466 * General category "Letter, Other" (Lo) 3467 */ 3468 OTHER_LETTER = 7, 3469 /** 3470 * General category "Letter, Titlecase" (Lt) 3471 */ 3472 TITLECASE_LETTER = 8, 3473 /** 3474 * General category "Letter, Uppercase" (Lu) 3475 */ 3476 UPPERCASE_LETTER = 9, 3477 /** 3478 * General category "Mark, Spacing" (Mc) 3479 */ 3480 SPACING_MARK = 10, 3481 /** 3482 * General category "Mark, Enclosing" (Me) 3483 */ 3484 ENCLOSING_MARK = 11, 3485 /** 3486 * General category "Mark, Nonspacing" (Mn) 3487 */ 3488 NON_SPACING_MARK = 12, 3489 /** 3490 * General category "Number, Decimal Digit" (Nd) 3491 */ 3492 DECIMAL_NUMBER = 13, 3493 /** 3494 * General category "Number, Letter" (Nl) 3495 */ 3496 LETTER_NUMBER = 14, 3497 /** 3498 * General category "Number, Other" (No) 3499 */ 3500 OTHER_NUMBER = 15, 3501 /** 3502 * General category "Punctuation, Connector" (Pc) 3503 */ 3504 CONNECT_PUNCTUATION = 16, 3505 /** 3506 * General category "Punctuation, Dash" (Pd) 3507 */ 3508 DASH_PUNCTUATION = 17, 3509 /** 3510 * General category "Punctuation, Close" (Pe) 3511 */ 3512 CLOSE_PUNCTUATION = 18, 3513 /** 3514 * General category "Punctuation, Final quote" (Pf) 3515 */ 3516 FINAL_PUNCTUATION = 19, 3517 /** 3518 * General category "Punctuation, Initial quote" (Pi) 3519 */ 3520 INITIAL_PUNCTUATION = 20, 3521 /** 3522 * General category "Punctuation, Other" (Po) 3523 */ 3524 OTHER_PUNCTUATION = 21, 3525 /** 3526 * General category "Punctuation, Open" (Ps) 3527 */ 3528 OPEN_PUNCTUATION = 22, 3529 /** 3530 * General category "Symbol, Currency" (Sc) 3531 */ 3532 CURRENCY_SYMBOL = 23, 3533 /** 3534 * General category "Symbol, Modifier" (Sk) 3535 */ 3536 MODIFIER_SYMBOL = 24, 3537 /** 3538 * General category "Symbol, Math" (Sm) 3539 */ 3540 MATH_SYMBOL = 25, 3541 /** 3542 * General category "Symbol, Other" (So) 3543 */ 3544 OTHER_SYMBOL = 26, 3545 /** 3546 * General category "Separator, Line" (Zl) 3547 */ 3548 LINE_SEPARATOR = 27, 3549 /** 3550 * General category "Separator, Paragraph" (Zp) 3551 */ 3552 PARAGRAPH_SEPARATOR = 28, 3553 /** 3554 * General category "Separator, Space" (Zs) 3555 */ 3556 SPACE_SEPARATOR = 29, 3557 } 3558 alias GUnicodeType UnicodeType; 3559 3560 /** 3561 * Error codes returned by #GUri methods. 3562 * 3563 * Since: 2.66 3564 */ 3565 public enum GUriError 3566 { 3567 /** 3568 * Generic error if no more specific error is available. 3569 * See the error message for details. 3570 */ 3571 FAILED = 0, 3572 /** 3573 * The scheme of a URI could not be parsed. 3574 */ 3575 BAD_SCHEME = 1, 3576 /** 3577 * The user/userinfo of a URI could not be parsed. 3578 */ 3579 BAD_USER = 2, 3580 /** 3581 * The password of a URI could not be parsed. 3582 */ 3583 BAD_PASSWORD = 3, 3584 /** 3585 * The authentication parameters of a URI could not be parsed. 3586 */ 3587 BAD_AUTH_PARAMS = 4, 3588 /** 3589 * The host of a URI could not be parsed. 3590 */ 3591 BAD_HOST = 5, 3592 /** 3593 * The port of a URI could not be parsed. 3594 */ 3595 BAD_PORT = 6, 3596 /** 3597 * The path of a URI could not be parsed. 3598 */ 3599 BAD_PATH = 7, 3600 /** 3601 * The query of a URI could not be parsed. 3602 */ 3603 BAD_QUERY = 8, 3604 /** 3605 * The fragment of a URI could not be parsed. 3606 */ 3607 BAD_FRAGMENT = 9, 3608 } 3609 alias GUriError UriError; 3610 3611 /** 3612 * Flags that describe a URI. 3613 * 3614 * When parsing a URI, if you need to choose different flags based on 3615 * the type of URI, you can use g_uri_peek_scheme() on the URI string 3616 * to check the scheme first, and use that to decide what flags to 3617 * parse it with. 3618 * 3619 * Since: 2.66 3620 */ 3621 public enum GUriFlags 3622 { 3623 /** 3624 * No flags set. 3625 */ 3626 NONE = 0, 3627 /** 3628 * Parse the URI more relaxedly than the 3629 * [RFC 3986](https://tools.ietf.org/html/rfc3986) grammar specifies, 3630 * fixing up or ignoring common mistakes in URIs coming from external 3631 * sources. This is also needed for some obscure URI schemes where `;` 3632 * separates the host from the path. Don’t use this flag unless you need to. 3633 */ 3634 PARSE_RELAXED = 1, 3635 /** 3636 * The userinfo field may contain a password, 3637 * which will be separated from the username by `:`. 3638 */ 3639 HAS_PASSWORD = 2, 3640 /** 3641 * The userinfo may contain additional 3642 * authentication-related parameters, which will be separated from 3643 * the username and/or password by `;`. 3644 */ 3645 HAS_AUTH_PARAMS = 4, 3646 /** 3647 * When parsing a URI, this indicates that `%`-encoded 3648 * characters in the userinfo, path, query, and fragment fields 3649 * should not be decoded. (And likewise the host field if 3650 * %G_URI_FLAGS_NON_DNS is also set.) When building a URI, it indicates 3651 * that you have already `%`-encoded the components, and so #GUri 3652 * should not do any encoding itself. 3653 */ 3654 ENCODED = 8, 3655 /** 3656 * The host component should not be assumed to be a 3657 * DNS hostname or IP address (for example, for `smb` URIs with NetBIOS 3658 * hostnames). 3659 */ 3660 NON_DNS = 16, 3661 /** 3662 * Same as %G_URI_FLAGS_ENCODED, for the query 3663 * field only. 3664 */ 3665 ENCODED_QUERY = 32, 3666 /** 3667 * Same as %G_URI_FLAGS_ENCODED, for the path only. 3668 */ 3669 ENCODED_PATH = 64, 3670 /** 3671 * Same as %G_URI_FLAGS_ENCODED, for the 3672 * fragment only. 3673 */ 3674 ENCODED_FRAGMENT = 128, 3675 /** 3676 * A scheme-based normalization will be applied. 3677 * For example, when parsing an HTTP URI changing omitted path to `/` and 3678 * omitted port to `80`; and when building a URI, changing empty path to `/` 3679 * and default port `80`). This only supports a subset of known schemes. (Since: 2.68) 3680 */ 3681 SCHEME_NORMALIZE = 256, 3682 } 3683 alias GUriFlags UriFlags; 3684 3685 /** 3686 * Flags describing what parts of the URI to hide in 3687 * g_uri_to_string_partial(). Note that %G_URI_HIDE_PASSWORD and 3688 * %G_URI_HIDE_AUTH_PARAMS will only work if the #GUri was parsed with 3689 * the corresponding flags. 3690 * 3691 * Since: 2.66 3692 */ 3693 public enum GUriHideFlags 3694 { 3695 /** 3696 * No flags set. 3697 */ 3698 NONE = 0, 3699 /** 3700 * Hide the userinfo. 3701 */ 3702 USERINFO = 1, 3703 /** 3704 * Hide the password. 3705 */ 3706 PASSWORD = 2, 3707 /** 3708 * Hide the auth_params. 3709 */ 3710 AUTH_PARAMS = 4, 3711 /** 3712 * Hide the query. 3713 */ 3714 QUERY = 8, 3715 /** 3716 * Hide the fragment. 3717 */ 3718 FRAGMENT = 16, 3719 } 3720 alias GUriHideFlags UriHideFlags; 3721 3722 /** 3723 * Flags modifying the way parameters are handled by g_uri_parse_params() and 3724 * #GUriParamsIter. 3725 * 3726 * Since: 2.66 3727 */ 3728 public enum GUriParamsFlags 3729 { 3730 /** 3731 * No flags set. 3732 */ 3733 NONE = 0, 3734 /** 3735 * Parameter names are case insensitive. 3736 */ 3737 CASE_INSENSITIVE = 1, 3738 /** 3739 * Replace `+` with space character. Only useful for 3740 * URLs on the web, using the `https` or `http` schemas. 3741 */ 3742 WWW_FORM = 2, 3743 /** 3744 * See %G_URI_FLAGS_PARSE_RELAXED. 3745 */ 3746 PARSE_RELAXED = 4, 3747 } 3748 alias GUriParamsFlags UriParamsFlags; 3749 3750 /** 3751 * These are logical ids for special directories which are defined 3752 * depending on the platform used. You should use g_get_user_special_dir() 3753 * to retrieve the full path associated to the logical id. 3754 * 3755 * The #GUserDirectory enumeration can be extended at later date. Not 3756 * every platform has a directory for every logical id in this 3757 * enumeration. 3758 * 3759 * Since: 2.14 3760 */ 3761 public enum GUserDirectory 3762 { 3763 /** 3764 * the user's Desktop directory 3765 */ 3766 DIRECTORY_DESKTOP = 0, 3767 /** 3768 * the user's Documents directory 3769 */ 3770 DIRECTORY_DOCUMENTS = 1, 3771 /** 3772 * the user's Downloads directory 3773 */ 3774 DIRECTORY_DOWNLOAD = 2, 3775 /** 3776 * the user's Music directory 3777 */ 3778 DIRECTORY_MUSIC = 3, 3779 /** 3780 * the user's Pictures directory 3781 */ 3782 DIRECTORY_PICTURES = 4, 3783 /** 3784 * the user's shared directory 3785 */ 3786 DIRECTORY_PUBLIC_SHARE = 5, 3787 /** 3788 * the user's Templates directory 3789 */ 3790 DIRECTORY_TEMPLATES = 6, 3791 /** 3792 * the user's Movies directory 3793 */ 3794 DIRECTORY_VIDEOS = 7, 3795 /** 3796 * the number of enum values 3797 */ 3798 N_DIRECTORIES = 8, 3799 } 3800 alias GUserDirectory UserDirectory; 3801 3802 /** 3803 * The range of possible top-level types of #GVariant instances. 3804 * 3805 * Since: 2.24 3806 */ 3807 public enum GVariantClass 3808 { 3809 /** 3810 * The #GVariant is a boolean. 3811 */ 3812 BOOLEAN = 98, 3813 /** 3814 * The #GVariant is a byte. 3815 */ 3816 BYTE = 121, 3817 /** 3818 * The #GVariant is a signed 16 bit integer. 3819 */ 3820 INT16 = 110, 3821 /** 3822 * The #GVariant is an unsigned 16 bit integer. 3823 */ 3824 UINT16 = 113, 3825 /** 3826 * The #GVariant is a signed 32 bit integer. 3827 */ 3828 INT32 = 105, 3829 /** 3830 * The #GVariant is an unsigned 32 bit integer. 3831 */ 3832 UINT32 = 117, 3833 /** 3834 * The #GVariant is a signed 64 bit integer. 3835 */ 3836 INT64 = 120, 3837 /** 3838 * The #GVariant is an unsigned 64 bit integer. 3839 */ 3840 UINT64 = 116, 3841 /** 3842 * The #GVariant is a file handle index. 3843 */ 3844 HANDLE = 104, 3845 /** 3846 * The #GVariant is a double precision floating 3847 * point value. 3848 */ 3849 DOUBLE = 100, 3850 /** 3851 * The #GVariant is a normal string. 3852 */ 3853 STRING = 115, 3854 /** 3855 * The #GVariant is a D-Bus object path 3856 * string. 3857 */ 3858 OBJECT_PATH = 111, 3859 /** 3860 * The #GVariant is a D-Bus signature string. 3861 */ 3862 SIGNATURE = 103, 3863 /** 3864 * The #GVariant is a variant. 3865 */ 3866 VARIANT = 118, 3867 /** 3868 * The #GVariant is a maybe-typed value. 3869 */ 3870 MAYBE = 109, 3871 /** 3872 * The #GVariant is an array. 3873 */ 3874 ARRAY = 97, 3875 /** 3876 * The #GVariant is a tuple. 3877 */ 3878 TUPLE = 40, 3879 /** 3880 * The #GVariant is a dictionary entry. 3881 */ 3882 DICT_ENTRY = 123, 3883 } 3884 alias GVariantClass VariantClass; 3885 3886 /** 3887 * Error codes returned by parsing text-format GVariants. 3888 */ 3889 public enum GVariantParseError 3890 { 3891 /** 3892 * generic error (unused) 3893 */ 3894 FAILED = 0, 3895 /** 3896 * a non-basic #GVariantType was given where a basic type was expected 3897 */ 3898 BASIC_TYPE_EXPECTED = 1, 3899 /** 3900 * cannot infer the #GVariantType 3901 */ 3902 CANNOT_INFER_TYPE = 2, 3903 /** 3904 * an indefinite #GVariantType was given where a definite type was expected 3905 */ 3906 DEFINITE_TYPE_EXPECTED = 3, 3907 /** 3908 * extra data after parsing finished 3909 */ 3910 INPUT_NOT_AT_END = 4, 3911 /** 3912 * invalid character in number or unicode escape 3913 */ 3914 INVALID_CHARACTER = 5, 3915 /** 3916 * not a valid #GVariant format string 3917 */ 3918 INVALID_FORMAT_STRING = 6, 3919 /** 3920 * not a valid object path 3921 */ 3922 INVALID_OBJECT_PATH = 7, 3923 /** 3924 * not a valid type signature 3925 */ 3926 INVALID_SIGNATURE = 8, 3927 /** 3928 * not a valid #GVariant type string 3929 */ 3930 INVALID_TYPE_STRING = 9, 3931 /** 3932 * could not find a common type for array entries 3933 */ 3934 NO_COMMON_TYPE = 10, 3935 /** 3936 * the numerical value is out of range of the given type 3937 */ 3938 NUMBER_OUT_OF_RANGE = 11, 3939 /** 3940 * the numerical value is out of range for any type 3941 */ 3942 NUMBER_TOO_BIG = 12, 3943 /** 3944 * cannot parse as variant of the specified type 3945 */ 3946 TYPE_ERROR = 13, 3947 /** 3948 * an unexpected token was encountered 3949 */ 3950 UNEXPECTED_TOKEN = 14, 3951 /** 3952 * an unknown keyword was encountered 3953 */ 3954 UNKNOWN_KEYWORD = 15, 3955 /** 3956 * unterminated string constant 3957 */ 3958 UNTERMINATED_STRING_CONSTANT = 16, 3959 /** 3960 * no value given 3961 */ 3962 VALUE_EXPECTED = 17, 3963 /** 3964 * variant was too deeply nested; #GVariant is only guaranteed to handle nesting up to 64 levels (Since: 2.64) 3965 */ 3966 RECURSION = 18, 3967 } 3968 alias GVariantParseError VariantParseError; 3969 3970 /** 3971 * Errors returned by g_module_open_full(). 3972 * 3973 * Since: 2.70 3974 */ 3975 public enum GModuleError 3976 { 3977 /** 3978 * there was an error loading or opening a module file 3979 */ 3980 FAILED = 0, 3981 /** 3982 * a module returned an error from its `g_module_check_init()` function 3983 */ 3984 CHECK_FAILED = 1, 3985 } 3986 alias GModuleError ModuleError; 3987 3988 /** 3989 * Flags passed to g_module_open(). 3990 * Note that these flags are not supported on all platforms. 3991 */ 3992 public enum GModuleFlags 3993 { 3994 /** 3995 * specifies that symbols are only resolved when 3996 * needed. The default action is to bind all symbols when the module 3997 * is loaded. 3998 */ 3999 LAZY = 1, 4000 /** 4001 * specifies that symbols in the module should 4002 * not be added to the global name space. The default action on most 4003 * platforms is to place symbols in the module in the global name space, 4004 * which may cause conflicts with existing symbols. 4005 */ 4006 LOCAL = 2, 4007 /** 4008 * mask for all flags. 4009 */ 4010 MASK = 3, 4011 } 4012 alias GModuleFlags ModuleFlags; 4013 4014 /** 4015 * Contains the public fields of a GArray. 4016 */ 4017 struct GArray 4018 { 4019 /** 4020 * a pointer to the element data. The data may be moved as 4021 * elements are added to the #GArray. 4022 */ 4023 char* data; 4024 /** 4025 * the number of elements in the #GArray not including the 4026 * possible terminating zero element. 4027 */ 4028 uint len; 4029 } 4030 4031 struct GAsyncQueue; 4032 4033 struct GBookmarkFile; 4034 4035 /** 4036 * Contains the public fields of a GByteArray. 4037 */ 4038 struct GByteArray 4039 { 4040 /** 4041 * a pointer to the element data. The data may be moved as 4042 * elements are added to the #GByteArray 4043 */ 4044 ubyte* data; 4045 /** 4046 * the number of elements in the #GByteArray 4047 */ 4048 uint len; 4049 } 4050 4051 struct GBytes; 4052 4053 struct GChecksum; 4054 4055 struct GCond 4056 { 4057 void* p; 4058 uint[2] i; 4059 } 4060 4061 /** 4062 * An opaque data structure that represents a keyed data list. 4063 * 4064 * See also: [Keyed data lists][glib-Keyed-Data-Lists]. 4065 */ 4066 struct GData; 4067 4068 struct GDate 4069 { 4070 import std.bitmanip: bitfields; 4071 mixin(bitfields!( 4072 uint, "julianDays", 32, 4073 uint, "julian", 1, 4074 uint, "dmy", 1, 4075 uint, "day", 6, 4076 uint, "month", 4, 4077 uint, "year", 16, 4078 uint, "", 4 4079 )); 4080 } 4081 4082 struct GDateTime; 4083 4084 /** 4085 * Associates a string with a bit flag. 4086 * Used in g_parse_debug_string(). 4087 */ 4088 struct GDebugKey 4089 { 4090 /** 4091 * the string 4092 */ 4093 const(char)* key; 4094 /** 4095 * the flag 4096 */ 4097 uint value; 4098 } 4099 4100 struct GDir; 4101 4102 /** 4103 * The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign, 4104 * mantissa and exponent of IEEE floats and doubles. These unions are defined 4105 * as appropriate for a given platform. IEEE floats and doubles are supported 4106 * (used for storage) by at least Intel, PPC and Sparc. 4107 */ 4108 struct GDoubleIEEE754 4109 { 4110 union 4111 { 4112 /** 4113 * the double value 4114 */ 4115 double vDouble; 4116 struct Mpn 4117 { 4118 import std.bitmanip: bitfields; 4119 mixin(bitfields!( 4120 uint, "mantissaLow", 32, 4121 uint, "mantissaHigh", 20, 4122 uint, "biasedExponent", 11, 4123 uint, "sign", 1 4124 )); 4125 } 4126 Mpn mpn; 4127 } 4128 } 4129 4130 struct GError 4131 { 4132 /** 4133 * error domain, e.g. %G_FILE_ERROR 4134 */ 4135 GQuark domain; 4136 /** 4137 * error code, e.g. %G_FILE_ERROR_NOENT 4138 */ 4139 int code; 4140 /** 4141 * human-readable informative error message 4142 */ 4143 char* message; 4144 } 4145 4146 /** 4147 * The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign, 4148 * mantissa and exponent of IEEE floats and doubles. These unions are defined 4149 * as appropriate for a given platform. IEEE floats and doubles are supported 4150 * (used for storage) by at least Intel, PPC and Sparc. 4151 */ 4152 struct GFloatIEEE754 4153 { 4154 union 4155 { 4156 /** 4157 * the double value 4158 */ 4159 float vFloat; 4160 struct Mpn 4161 { 4162 import std.bitmanip: bitfields; 4163 mixin(bitfields!( 4164 uint, "mantissa", 23, 4165 uint, "biasedExponent", 8, 4166 uint, "sign", 1 4167 )); 4168 } 4169 Mpn mpn; 4170 } 4171 } 4172 4173 /** 4174 * The #GHashTable struct is an opaque data structure to represent a 4175 * [Hash Table][glib-Hash-Tables]. It should only be accessed via the 4176 * following functions. 4177 */ 4178 struct GHashTable; 4179 4180 struct GHashTableIter 4181 { 4182 void* dummy1; 4183 void* dummy2; 4184 void* dummy3; 4185 int dummy4; 4186 bool dummy5; 4187 void* dummy6; 4188 } 4189 4190 struct GHmac; 4191 4192 struct GHook 4193 { 4194 /** 4195 * data which is passed to func when this hook is invoked 4196 */ 4197 void* data; 4198 /** 4199 * pointer to the next hook in the list 4200 */ 4201 GHook* next; 4202 /** 4203 * pointer to the previous hook in the list 4204 */ 4205 GHook* prev; 4206 /** 4207 * the reference count of this hook 4208 */ 4209 uint refCount; 4210 /** 4211 * the id of this hook, which is unique within its list 4212 */ 4213 gulong hookId; 4214 /** 4215 * flags which are set for this hook. See #GHookFlagMask for 4216 * predefined flags 4217 */ 4218 uint flags; 4219 /** 4220 * the function to call when this hook is invoked. The possible 4221 * signatures for this function are #GHookFunc and #GHookCheckFunc 4222 */ 4223 void* func; 4224 /** 4225 * the default @finalize_hook function of a #GHookList calls 4226 * this member of the hook that is being finalized 4227 */ 4228 GDestroyNotify destroy; 4229 } 4230 4231 struct GHookList 4232 { 4233 /** 4234 * the next free #GHook id 4235 */ 4236 gulong seqId; 4237 import std.bitmanip: bitfields; 4238 mixin(bitfields!( 4239 uint, "hookSize", 16, 4240 uint, "isSetup", 1, 4241 uint, "", 15 4242 )); 4243 /** 4244 * the first #GHook element in the list 4245 */ 4246 GHook* hooks; 4247 /** 4248 * unused 4249 */ 4250 void* dummy3; 4251 /** 4252 * the function to call to finalize a #GHook element. 4253 * The default behaviour is to call the hooks @destroy function 4254 */ 4255 GHookFinalizeFunc finalizeHook; 4256 /** 4257 * unused 4258 */ 4259 void*[2] dummy; 4260 } 4261 4262 struct GIOChannel 4263 { 4264 int refCount; 4265 GIOFuncs* funcs; 4266 char* encoding; 4267 GIConv readCd; 4268 GIConv writeCd; 4269 char* lineTerm; 4270 uint lineTermLen; 4271 size_t bufSize; 4272 GString* readBuf; 4273 GString* encodedReadBuf; 4274 GString* writeBuf; 4275 char[6] partialWriteBuf; 4276 import std.bitmanip: bitfields; 4277 mixin(bitfields!( 4278 uint, "useBuffer", 1, 4279 uint, "doEncode", 1, 4280 uint, "closeOnUnref", 1, 4281 uint, "isReadable", 1, 4282 uint, "isWriteable", 1, 4283 uint, "isSeekable", 1, 4284 uint, "", 26 4285 )); 4286 void* reserved1; 4287 void* reserved2; 4288 } 4289 4290 /** 4291 * A table of functions used to handle different types of #GIOChannel 4292 * in a generic way. 4293 */ 4294 struct GIOFuncs 4295 { 4296 /** */ 4297 extern(C) GIOStatus function(GIOChannel* channel, char* buf, size_t count, size_t* bytesRead, GError** err) ioRead; 4298 /** */ 4299 extern(C) GIOStatus function(GIOChannel* channel, const(char)* buf, size_t count, size_t* bytesWritten, GError** err) ioWrite; 4300 /** */ 4301 extern(C) GIOStatus function(GIOChannel* channel, long offset, GSeekType type, GError** err) ioSeek; 4302 /** */ 4303 extern(C) GIOStatus function(GIOChannel* channel, GError** err) ioClose; 4304 /** */ 4305 extern(C) GSource* function(GIOChannel* channel, GIOCondition condition) ioCreateWatch; 4306 /** */ 4307 extern(C) void function(GIOChannel* channel) ioFree; 4308 /** */ 4309 extern(C) GIOStatus function(GIOChannel* channel, GIOFlags flags, GError** err) ioSetFlags; 4310 /** */ 4311 extern(C) GIOFlags function(GIOChannel* channel) ioGetFlags; 4312 } 4313 4314 struct GKeyFile; 4315 4316 /** 4317 * The #GList struct is used for each element in a doubly-linked list. 4318 */ 4319 struct GList 4320 { 4321 /** 4322 * holds the element's data, which can be a pointer to any kind 4323 * of data, or any integer value using the 4324 * [Type Conversion Macros][glib-Type-Conversion-Macros] 4325 */ 4326 void* data; 4327 /** 4328 * contains the link to the next element in the list 4329 */ 4330 GList* next; 4331 /** 4332 * contains the link to the previous element in the list 4333 */ 4334 GList* prev; 4335 } 4336 4337 /** 4338 * Structure representing a single field in a structured log entry. See 4339 * g_log_structured() for details. 4340 * 4341 * Log fields may contain arbitrary values, including binary with embedded nul 4342 * bytes. If the field contains a string, the string must be UTF-8 encoded and 4343 * have a trailing nul byte. Otherwise, @length must be set to a non-negative 4344 * value. 4345 * 4346 * Since: 2.50 4347 */ 4348 struct GLogField 4349 { 4350 /** 4351 * field name (UTF-8 string) 4352 */ 4353 const(char)* key; 4354 /** 4355 * field value (arbitrary bytes) 4356 */ 4357 void* value; 4358 /** 4359 * length of @value, in bytes, or -1 if it is nul-terminated 4360 */ 4361 ptrdiff_t length; 4362 } 4363 4364 struct GMainContext; 4365 4366 struct GMainLoop; 4367 4368 struct GMappedFile; 4369 4370 struct GMarkupParseContext; 4371 4372 /** 4373 * Any of the fields in #GMarkupParser can be %NULL, in which case they 4374 * will be ignored. Except for the @error function, any of these callbacks 4375 * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT, 4376 * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT 4377 * errors are intended to be set from these callbacks. If you set an error 4378 * from a callback, g_markup_parse_context_parse() will report that error 4379 * back to its caller. 4380 */ 4381 struct GMarkupParser 4382 { 4383 /** */ 4384 extern(C) void function(GMarkupParseContext* context, const(char)* elementName, char** attributeNames, char** attributeValues, void* userData, GError** err) startElement; 4385 /** */ 4386 extern(C) void function(GMarkupParseContext* context, const(char)* elementName, void* userData, GError** err) endElement; 4387 /** */ 4388 extern(C) void function(GMarkupParseContext* context, const(char)* text, size_t textLen, void* userData, GError** err) text; 4389 /** */ 4390 extern(C) void function(GMarkupParseContext* context, const(char)* passthroughText, size_t textLen, void* userData, GError** err) passthrough; 4391 /** */ 4392 extern(C) void function(GMarkupParseContext* context, GError* error, void* userData) error; 4393 } 4394 4395 struct GMatchInfo; 4396 4397 /** 4398 * A set of functions used to perform memory allocation. The same #GMemVTable must 4399 * be used for all allocations in the same program; a call to g_mem_set_vtable(), 4400 * if it exists, should be prior to any use of GLib. 4401 * 4402 * This functions related to this has been deprecated in 2.46, and no longer work. 4403 */ 4404 struct GMemVTable 4405 { 4406 /** */ 4407 extern(C) void* function(size_t nBytes) malloc; 4408 /** */ 4409 extern(C) void* function(void* mem, size_t nBytes) realloc; 4410 /** */ 4411 extern(C) void function(void* mem) free; 4412 /** */ 4413 extern(C) void* function(size_t nBlocks, size_t nBlockBytes) calloc; 4414 /** */ 4415 extern(C) void* function(size_t nBytes) tryMalloc; 4416 /** */ 4417 extern(C) void* function(void* mem, size_t nBytes) tryRealloc; 4418 } 4419 4420 struct GMutex 4421 { 4422 union 4423 { 4424 void* p; 4425 uint[2] i; 4426 } 4427 } 4428 4429 struct GNode 4430 { 4431 /** 4432 * contains the actual data of the node. 4433 */ 4434 void* data; 4435 /** 4436 * points to the node's next sibling (a sibling is another 4437 * #GNode with the same parent). 4438 */ 4439 GNode* next; 4440 /** 4441 * points to the node's previous sibling. 4442 */ 4443 GNode* prev; 4444 /** 4445 * points to the parent of the #GNode, or is %NULL if the 4446 * #GNode is the root of the tree. 4447 */ 4448 GNode* parent; 4449 /** 4450 * points to the first child of the #GNode. The other 4451 * children are accessed by using the @next pointer of each 4452 * child. 4453 */ 4454 GNode* children; 4455 } 4456 4457 struct GOnce 4458 { 4459 /** 4460 * the status of the #GOnce 4461 */ 4462 GOnceStatus status; 4463 /** 4464 * the value returned by the call to the function, if @status 4465 * is %G_ONCE_STATUS_READY 4466 */ 4467 void* retval; 4468 } 4469 4470 struct GOptionContext; 4471 4472 /** 4473 * A GOptionEntry struct defines a single option. To have an effect, they 4474 * must be added to a #GOptionGroup with g_option_context_add_main_entries() 4475 * or g_option_group_add_entries(). 4476 */ 4477 struct GOptionEntry 4478 { 4479 /** 4480 * The long name of an option can be used to specify it 4481 * in a commandline as `--long_name`. Every option must have a 4482 * long name. To resolve conflicts if multiple option groups contain 4483 * the same long name, it is also possible to specify the option as 4484 * `--groupname-long_name`. 4485 */ 4486 const(char)* longName; 4487 /** 4488 * If an option has a short name, it can be specified 4489 * `-short_name` in a commandline. @short_name must be a printable 4490 * ASCII character different from '-', or zero if the option has no 4491 * short name. 4492 */ 4493 char shortName; 4494 /** 4495 * Flags from #GOptionFlags 4496 */ 4497 int flags; 4498 /** 4499 * The type of the option, as a #GOptionArg 4500 */ 4501 GOptionArg arg; 4502 /** 4503 * If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data 4504 * must point to a #GOptionArgFunc callback function, which will be 4505 * called to handle the extra argument. Otherwise, @arg_data is a 4506 * pointer to a location to store the value, the required type of 4507 * the location depends on the @arg type: 4508 * - %G_OPTION_ARG_NONE: %gboolean 4509 * - %G_OPTION_ARG_STRING: %gchar* 4510 * - %G_OPTION_ARG_INT: %gint 4511 * - %G_OPTION_ARG_FILENAME: %gchar* 4512 * - %G_OPTION_ARG_STRING_ARRAY: %gchar** 4513 * - %G_OPTION_ARG_FILENAME_ARRAY: %gchar** 4514 * - %G_OPTION_ARG_DOUBLE: %gdouble 4515 * If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME, 4516 * the location will contain a newly allocated string if the option 4517 * was given. That string needs to be freed by the callee using g_free(). 4518 * Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or 4519 * %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev(). 4520 */ 4521 void* argData; 4522 /** 4523 * the description for the option in `--help` 4524 * output. The @description is translated using the @translate_func 4525 * of the group, see g_option_group_set_translation_domain(). 4526 */ 4527 const(char)* description; 4528 /** 4529 * The placeholder to use for the extra argument parsed 4530 * by the option in `--help` output. The @arg_description is translated 4531 * using the @translate_func of the group, see 4532 * g_option_group_set_translation_domain(). 4533 */ 4534 const(char)* argDescription; 4535 } 4536 4537 struct GOptionGroup; 4538 4539 struct GPatternSpec; 4540 4541 /** 4542 * Represents a file descriptor, which events to poll for, and which events 4543 * occurred. 4544 */ 4545 struct GPollFD 4546 { 4547 /** 4548 * the file descriptor to poll (or a HANDLE on Win32) 4549 */ 4550 int fd; 4551 /** 4552 * a bitwise combination from #GIOCondition, specifying which 4553 * events should be polled for. Typically for reading from a file 4554 * descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and 4555 * for writing you would use %G_IO_OUT | %G_IO_ERR. 4556 */ 4557 ushort events; 4558 /** 4559 * a bitwise combination of flags from #GIOCondition, returned 4560 * from the poll() function to indicate which events occurred. 4561 */ 4562 ushort revents; 4563 } 4564 4565 struct GPrivate 4566 { 4567 void* p; 4568 GDestroyNotify notify; 4569 void*[2] future; 4570 } 4571 4572 /** 4573 * Contains the public fields of a pointer array. 4574 */ 4575 struct GPtrArray 4576 { 4577 /** 4578 * points to the array of pointers, which may be moved when the 4579 * array grows 4580 */ 4581 void** pdata; 4582 /** 4583 * number of pointers in the array 4584 */ 4585 uint len; 4586 } 4587 4588 struct GQueue 4589 { 4590 /** 4591 * a pointer to the first element of the queue 4592 */ 4593 GList* head; 4594 /** 4595 * a pointer to the last element of the queue 4596 */ 4597 GList* tail; 4598 /** 4599 * the number of elements in the queue 4600 */ 4601 uint length; 4602 } 4603 4604 struct GRWLock 4605 { 4606 void* p; 4607 uint[2] i; 4608 } 4609 4610 struct GRand; 4611 4612 struct GRecMutex 4613 { 4614 void* p; 4615 uint[2] i; 4616 } 4617 4618 struct GRegex; 4619 4620 /** 4621 * The #GSList struct is used for each element in the singly-linked 4622 * list. 4623 */ 4624 struct GSList 4625 { 4626 /** 4627 * holds the element's data, which can be a pointer to any kind 4628 * of data, or any integer value using the 4629 * [Type Conversion Macros][glib-Type-Conversion-Macros] 4630 */ 4631 void* data; 4632 /** 4633 * contains the link to the next element in the list. 4634 */ 4635 GSList* next; 4636 } 4637 4638 struct GScanner 4639 { 4640 /** 4641 * unused 4642 */ 4643 void* userData; 4644 /** 4645 * unused 4646 */ 4647 uint maxParseErrors; 4648 /** 4649 * g_scanner_error() increments this field 4650 */ 4651 uint parseErrors; 4652 /** 4653 * name of input stream, featured by the default message handler 4654 */ 4655 const(char)* inputName; 4656 /** 4657 * quarked data 4658 */ 4659 GData* qdata; 4660 /** 4661 * link into the scanner configuration 4662 */ 4663 GScannerConfig* config; 4664 /** 4665 * token parsed by the last g_scanner_get_next_token() 4666 */ 4667 GTokenType token; 4668 /** 4669 * value of the last token from g_scanner_get_next_token() 4670 */ 4671 GTokenValue value; 4672 /** 4673 * line number of the last token from g_scanner_get_next_token() 4674 */ 4675 uint line; 4676 /** 4677 * char number of the last token from g_scanner_get_next_token() 4678 */ 4679 uint position; 4680 /** 4681 * token parsed by the last g_scanner_peek_next_token() 4682 */ 4683 GTokenType nextToken; 4684 /** 4685 * value of the last token from g_scanner_peek_next_token() 4686 */ 4687 GTokenValue nextValue; 4688 /** 4689 * line number of the last token from g_scanner_peek_next_token() 4690 */ 4691 uint nextLine; 4692 /** 4693 * char number of the last token from g_scanner_peek_next_token() 4694 */ 4695 uint nextPosition; 4696 GHashTable* symbolTable; 4697 int inputFd; 4698 const(char)* text; 4699 const(char)* textEnd; 4700 char* buffer; 4701 uint scopeId; 4702 /** 4703 * handler function for _warn and _error 4704 */ 4705 GScannerMsgFunc msgHandler; 4706 } 4707 4708 /** 4709 * Specifies the #GScanner parser configuration. Most settings can 4710 * be changed during the parsing phase and will affect the lexical 4711 * parsing of the next unpeeked token. 4712 */ 4713 struct GScannerConfig 4714 { 4715 /** 4716 * specifies which characters should be skipped 4717 * by the scanner (the default is the whitespace characters: space, 4718 * tab, carriage-return and line-feed). 4719 */ 4720 char* csetSkipCharacters; 4721 /** 4722 * specifies the characters which can start 4723 * identifiers (the default is %G_CSET_a_2_z, "_", and %G_CSET_A_2_Z). 4724 */ 4725 char* csetIdentifierFirst; 4726 /** 4727 * specifies the characters which can be used 4728 * in identifiers, after the first character (the default is 4729 * %G_CSET_a_2_z, "_0123456789", %G_CSET_A_2_Z, %G_CSET_LATINS, 4730 * %G_CSET_LATINC). 4731 */ 4732 char* csetIdentifierNth; 4733 /** 4734 * specifies the characters at the start and 4735 * end of single-line comments. The default is "#\n" which means 4736 * that single-line comments start with a '#' and continue until 4737 * a '\n' (end of line). 4738 */ 4739 char* cpairCommentSingle; 4740 import std.bitmanip: bitfields; 4741 mixin(bitfields!( 4742 uint, "caseSensitive", 1, 4743 uint, "skipCommentMulti", 1, 4744 uint, "skipCommentSingle", 1, 4745 uint, "scanCommentMulti", 1, 4746 uint, "scanIdentifier", 1, 4747 uint, "scanIdentifier1char", 1, 4748 uint, "scanIdentifierNULL", 1, 4749 uint, "scanSymbols", 1, 4750 uint, "scanBinary", 1, 4751 uint, "scanOctal", 1, 4752 uint, "scanFloat", 1, 4753 uint, "scanHex", 1, 4754 uint, "scanHexDollar", 1, 4755 uint, "scanStringSq", 1, 4756 uint, "scanStringDq", 1, 4757 uint, "numbers2Int", 1, 4758 uint, "int2Float", 1, 4759 uint, "identifier2String", 1, 4760 uint, "char2Token", 1, 4761 uint, "symbol2Token", 1, 4762 uint, "scope0Fallback", 1, 4763 uint, "storeInt64", 1, 4764 uint, "", 10 4765 )); 4766 uint paddingDummy; 4767 } 4768 4769 struct GSequence; 4770 4771 struct GSequenceIter; 4772 4773 struct GSource 4774 { 4775 void* callbackData; 4776 GSourceCallbackFuncs* callbackFuncs; 4777 GSourceFuncs* sourceFuncs; 4778 uint refCount; 4779 GMainContext* context; 4780 int priority; 4781 uint flags; 4782 uint sourceId; 4783 GSList* pollFds; 4784 GSource* prev; 4785 GSource* next; 4786 char* name; 4787 GSourcePrivate* priv; 4788 } 4789 4790 /** 4791 * The `GSourceCallbackFuncs` struct contains 4792 * functions for managing callback objects. 4793 */ 4794 struct GSourceCallbackFuncs 4795 { 4796 /** */ 4797 extern(C) void function(void* cbData) ref_; 4798 /** */ 4799 extern(C) void function(void* cbData) unref; 4800 /** */ 4801 extern(C) void function(void* cbData, GSource* source, GSourceFunc* func, void** data) get; 4802 } 4803 4804 /** 4805 * The `GSourceFuncs` struct contains a table of 4806 * functions used to handle event sources in a generic manner. 4807 * 4808 * For idle sources, the prepare and check functions always return %TRUE 4809 * to indicate that the source is always ready to be processed. The prepare 4810 * function also returns a timeout value of 0 to ensure that the poll() call 4811 * doesn't block (since that would be time wasted which could have been spent 4812 * running the idle function). 4813 * 4814 * For timeout sources, the prepare and check functions both return %TRUE 4815 * if the timeout interval has expired. The prepare function also returns 4816 * a timeout value to ensure that the poll() call doesn't block too long 4817 * and miss the next timeout. 4818 * 4819 * For file descriptor sources, the prepare function typically returns %FALSE, 4820 * since it must wait until poll() has been called before it knows whether 4821 * any events need to be processed. It sets the returned timeout to -1 to 4822 * indicate that it doesn't mind how long the poll() call blocks. In the 4823 * check function, it tests the results of the poll() call to see if the 4824 * required condition has been met, and returns %TRUE if so. 4825 */ 4826 struct GSourceFuncs 4827 { 4828 /** */ 4829 extern(C) int function(GSource* source, int* timeout) prepare; 4830 /** */ 4831 extern(C) int function(GSource* source) check; 4832 /** */ 4833 extern(C) int function(GSource* source, GSourceFunc callback, void* userData) dispatch; 4834 /** */ 4835 extern(C) void function(GSource* source) finalize; 4836 GSourceFunc closureCallback; 4837 GSourceDummyMarshal closureMarshal; 4838 } 4839 4840 struct GSourcePrivate; 4841 4842 /** 4843 * A type corresponding to the appropriate struct type for the stat() 4844 * system call, depending on the platform and/or compiler being used. 4845 * 4846 * See g_stat() for more information. 4847 */ 4848 struct GStatBuf; 4849 4850 struct GString 4851 { 4852 /** 4853 * points to the character data. It may move as text is added. 4854 * The @str field is null-terminated and so 4855 * can be used as an ordinary C string. 4856 */ 4857 char* str; 4858 /** 4859 * contains the length of the string, not including the 4860 * terminating nul byte. 4861 */ 4862 size_t len; 4863 /** 4864 * the number of bytes that can be stored in the 4865 * string before it needs to be reallocated. May be larger than @len. 4866 */ 4867 size_t allocatedLen; 4868 } 4869 4870 struct GStringChunk; 4871 4872 struct GStrvBuilder; 4873 4874 struct GTestCase; 4875 4876 struct GTestConfig 4877 { 4878 bool testInitialized; 4879 bool testQuick; 4880 bool testPerf; 4881 bool testVerbose; 4882 bool testQuiet; 4883 bool testUndefined; 4884 } 4885 4886 struct GTestLogBuffer 4887 { 4888 GString* data; 4889 GSList* msgs; 4890 } 4891 4892 struct GTestLogMsg 4893 { 4894 GTestLogType logType; 4895 uint nStrings; 4896 char** strings; 4897 uint nNums; 4898 real nums; 4899 } 4900 4901 struct GTestSuite; 4902 4903 struct GThread; 4904 4905 struct GThreadPool 4906 { 4907 /** 4908 * the function to execute in the threads of this pool 4909 */ 4910 GFunc func; 4911 /** 4912 * the user data for the threads of this pool 4913 */ 4914 void* userData; 4915 /** 4916 * are all threads exclusive to this pool 4917 */ 4918 bool exclusive; 4919 } 4920 4921 struct GTimeVal 4922 { 4923 /** 4924 * seconds 4925 */ 4926 glong tvSec; 4927 /** 4928 * microseconds 4929 */ 4930 glong tvUsec; 4931 } 4932 4933 struct GTimeZone; 4934 4935 struct GTimer; 4936 4937 /** 4938 * A union holding the value of the token. 4939 */ 4940 struct GTokenValue 4941 { 4942 union 4943 { 4944 /** 4945 * token symbol value 4946 */ 4947 void* vSymbol; 4948 /** 4949 * token identifier value 4950 */ 4951 char* vIdentifier; 4952 /** 4953 * token binary integer value 4954 */ 4955 gulong vBinary; 4956 /** 4957 * octal integer value 4958 */ 4959 gulong vOctal; 4960 /** 4961 * integer value 4962 */ 4963 gulong vInt; 4964 /** 4965 * 64-bit integer value 4966 */ 4967 ulong vInt64; 4968 /** 4969 * floating point value 4970 */ 4971 double vFloat; 4972 /** 4973 * hex integer value 4974 */ 4975 gulong vHex; 4976 /** 4977 * string value 4978 */ 4979 char* vString; 4980 /** 4981 * comment value 4982 */ 4983 char* vComment; 4984 /** 4985 * character value 4986 */ 4987 char vChar; 4988 /** 4989 * error value 4990 */ 4991 uint vError; 4992 } 4993 } 4994 4995 /** 4996 * Each piece of memory that is pushed onto the stack 4997 * is cast to a GTrashStack*. 4998 * 4999 * Deprecated: #GTrashStack is deprecated without replacement 5000 */ 5001 struct GTrashStack 5002 { 5003 /** 5004 * pointer to the previous element of the stack, 5005 * gets stored in the first `sizeof (gpointer)` 5006 * bytes of the element 5007 */ 5008 GTrashStack* next; 5009 } 5010 5011 struct GTree; 5012 5013 struct GTreeNode; 5014 5015 struct GUri; 5016 5017 struct GUriParamsIter 5018 { 5019 int dummy0; 5020 void* dummy1; 5021 void* dummy2; 5022 ubyte[256] dummy3; 5023 } 5024 5025 struct GVariant; 5026 5027 struct GVariantBuilder 5028 { 5029 union U 5030 { 5031 struct S 5032 { 5033 size_t partialMagic; 5034 GVariantType* type; 5035 size_t[14] y; 5036 } 5037 S s; 5038 size_t[16] x; 5039 } 5040 U u; 5041 } 5042 5043 struct GVariantDict 5044 { 5045 union U 5046 { 5047 struct S 5048 { 5049 GVariant* asv; 5050 size_t partialMagic; 5051 size_t[14] y; 5052 } 5053 S s; 5054 size_t[16] x; 5055 } 5056 U u; 5057 } 5058 5059 struct GVariantIter 5060 { 5061 size_t[16] x; 5062 } 5063 5064 struct GVariantType; 5065 5066 struct GModule; 5067 5068 /** 5069 * Prototype of a #GChildWatchSource callback, called when a child 5070 * process has exited. 5071 * 5072 * To interpret @wait_status, see the documentation 5073 * for g_spawn_check_wait_status(). In particular, 5074 * on Unix platforms, note that it is usually not equal 5075 * to the integer passed to `exit()` or returned from `main()`. 5076 * 5077 * Params: 5078 * pid = the process id of the child process 5079 * waitStatus = Status information about the child process, encoded 5080 * in a platform-specific manner 5081 * userData = user data passed to g_child_watch_add() 5082 */ 5083 public alias extern(C) void function(GPid pid, int waitStatus, void* userData) GChildWatchFunc; 5084 5085 /** 5086 * Specifies the type of function passed to g_clear_handle_id(). 5087 * The implementation is expected to free the resource identified 5088 * by @handle_id; for instance, if @handle_id is a #GSource ID, 5089 * g_source_remove() can be used. 5090 * 5091 * Params: 5092 * handleId = the handle ID to clear 5093 * 5094 * Since: 2.56 5095 */ 5096 public alias extern(C) void function(uint handleId) GClearHandleFunc; 5097 5098 /** 5099 * Specifies the type of a comparison function used to compare two 5100 * values. The function should return a negative integer if the first 5101 * value comes before the second, 0 if they are equal, or a positive 5102 * integer if the first value comes after the second. 5103 * 5104 * Params: 5105 * a = a value 5106 * b = a value to compare with 5107 * userData = user data 5108 * 5109 * Returns: negative value if @a < @b; zero if @a = @b; positive 5110 * value if @a > @b 5111 */ 5112 public alias extern(C) int function(void* a, void* b, void* userData) GCompareDataFunc; 5113 5114 /** 5115 * Specifies the type of a comparison function used to compare two 5116 * values. The function should return a negative integer if the first 5117 * value comes before the second, 0 if they are equal, or a positive 5118 * integer if the first value comes after the second. 5119 * 5120 * Params: 5121 * a = a value 5122 * b = a value to compare with 5123 * 5124 * Returns: negative value if @a < @b; zero if @a = @b; positive 5125 * value if @a > @b 5126 */ 5127 public alias extern(C) int function(void* a, void* b) GCompareFunc; 5128 5129 /** 5130 * A function of this signature is used to copy the node data 5131 * when doing a deep-copy of a tree. 5132 * 5133 * Params: 5134 * src = A pointer to the data which should be copied 5135 * data = Additional data 5136 * 5137 * Returns: A pointer to the copy 5138 * 5139 * Since: 2.4 5140 */ 5141 public alias extern(C) void* function(void* src, void* data) GCopyFunc; 5142 5143 /** 5144 * Specifies the type of function passed to g_dataset_foreach(). It is 5145 * called with each #GQuark id and associated data element, together 5146 * with the @user_data parameter supplied to g_dataset_foreach(). 5147 * 5148 * Params: 5149 * keyId = the #GQuark id to identifying the data element. 5150 * data = the data element. 5151 * userData = user data passed to g_dataset_foreach(). 5152 */ 5153 public alias extern(C) void function(GQuark keyId, void* data, void* userData) GDataForeachFunc; 5154 5155 /** 5156 * Specifies the type of function which is called when a data element 5157 * is destroyed. It is passed the pointer to the data element and 5158 * should free any memory and resources allocated for it. 5159 * 5160 * Params: 5161 * data = the data element. 5162 */ 5163 public alias extern(C) void function(void* data) GDestroyNotify; 5164 5165 /** 5166 * The type of functions that are used to 'duplicate' an object. 5167 * What this means depends on the context, it could just be 5168 * incrementing the reference count, if @data is a ref-counted 5169 * object. 5170 * 5171 * Params: 5172 * data = the data to duplicate 5173 * userData = user data that was specified in 5174 * g_datalist_id_dup_data() 5175 * 5176 * Returns: a duplicate of data 5177 */ 5178 public alias extern(C) void* function(void* data, void* userData) GDuplicateFunc; 5179 5180 /** 5181 * Specifies the type of a function used to test two values for 5182 * equality. The function should return %TRUE if both values are equal 5183 * and %FALSE otherwise. 5184 * 5185 * Params: 5186 * a = a value 5187 * b = a value to compare with 5188 * 5189 * Returns: %TRUE if @a = @b; %FALSE otherwise 5190 */ 5191 public alias extern(C) int function(void* a, void* b) GEqualFunc; 5192 5193 /** 5194 * Specifies the type of function which is called when an extended 5195 * error instance is freed. It is passed the error pointer about to be 5196 * freed, and should free the error's private data fields. 5197 * 5198 * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it 5199 * already takes care of getting the private data from @error. 5200 * 5201 * Params: 5202 * error = extended error to clear 5203 * 5204 * Since: 2.68 5205 */ 5206 public alias extern(C) void function(GError* error) GErrorClearFunc; 5207 5208 /** 5209 * Specifies the type of function which is called when an extended 5210 * error instance is copied. It is passed the pointer to the 5211 * destination error and source error, and should copy only the fields 5212 * of the private data from @src_error to @dest_error. 5213 * 5214 * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it 5215 * already takes care of getting the private data from @src_error and 5216 * @dest_error. 5217 * 5218 * Params: 5219 * srcError = source extended error 5220 * destError = destination extended error 5221 * 5222 * Since: 2.68 5223 */ 5224 public alias extern(C) void function(GError* srcError, GError* destError) GErrorCopyFunc; 5225 5226 /** 5227 * Specifies the type of function which is called just after an 5228 * extended error instance is created and its fields filled. It should 5229 * only initialize the fields in the private data, which can be 5230 * received with the generated `*_get_private()` function. 5231 * 5232 * Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it 5233 * already takes care of getting the private data from @error. 5234 * 5235 * Params: 5236 * error = extended error 5237 * 5238 * Since: 2.68 5239 */ 5240 public alias extern(C) void function(GError* error) GErrorInitFunc; 5241 5242 /** 5243 * Declares a type of function which takes an arbitrary 5244 * data pointer argument and has no return value. It is 5245 * not currently used in GLib or GTK+. 5246 * 5247 * Params: 5248 * data = a data pointer 5249 */ 5250 public alias extern(C) void function(void* data) GFreeFunc; 5251 5252 /** 5253 * Specifies the type of functions passed to g_list_foreach() and 5254 * g_slist_foreach(). 5255 * 5256 * Params: 5257 * data = the element's data 5258 * userData = user data passed to g_list_foreach() or g_slist_foreach() 5259 */ 5260 public alias extern(C) void function(void* data, void* userData) GFunc; 5261 5262 /** 5263 * Specifies the type of the function passed to g_hash_table_foreach(). 5264 * It is called with each key/value pair, together with the @user_data 5265 * parameter which is passed to g_hash_table_foreach(). 5266 * 5267 * Params: 5268 * key = a key 5269 * value = the value corresponding to the key 5270 * userData = user data passed to g_hash_table_foreach() 5271 */ 5272 public alias extern(C) void function(void* key, void* value, void* userData) GHFunc; 5273 5274 /** 5275 * Specifies the type of the function passed to 5276 * g_hash_table_foreach_remove(). It is called with each key/value 5277 * pair, together with the @user_data parameter passed to 5278 * g_hash_table_foreach_remove(). It should return %TRUE if the 5279 * key/value pair should be removed from the #GHashTable. 5280 * 5281 * Params: 5282 * key = a key 5283 * value = the value associated with the key 5284 * userData = user data passed to g_hash_table_remove() 5285 * 5286 * Returns: %TRUE if the key/value pair should be removed from the 5287 * #GHashTable 5288 */ 5289 public alias extern(C) int function(void* key, void* value, void* userData) GHRFunc; 5290 5291 /** 5292 * Specifies the type of the hash function which is passed to 5293 * g_hash_table_new() when a #GHashTable is created. 5294 * 5295 * The function is passed a key and should return a #guint hash value. 5296 * The functions g_direct_hash(), g_int_hash() and g_str_hash() provide 5297 * hash functions which can be used when the key is a #gpointer, #gint*, 5298 * and #gchar* respectively. 5299 * 5300 * g_direct_hash() is also the appropriate hash function for keys 5301 * of the form `GINT_TO_POINTER (n)` (or similar macros). 5302 * 5303 * A good hash functions should produce 5304 * hash values that are evenly distributed over a fairly large range. 5305 * The modulus is taken with the hash table size (a prime number) to 5306 * find the 'bucket' to place each key into. The function should also 5307 * be very fast, since it is called for each key lookup. 5308 * 5309 * Note that the hash functions provided by GLib have these qualities, 5310 * but are not particularly robust against manufactured keys that 5311 * cause hash collisions. Therefore, you should consider choosing 5312 * a more secure hash function when using a GHashTable with keys 5313 * that originate in untrusted data (such as HTTP requests). 5314 * Using g_str_hash() in that situation might make your application 5315 * vulnerable to 5316 * [Algorithmic Complexity Attacks](https://lwn.net/Articles/474912/). 5317 * 5318 * The key to choosing a good hash is unpredictability. Even 5319 * cryptographic hashes are very easy to find collisions for when the 5320 * remainder is taken modulo a somewhat predictable prime number. There 5321 * must be an element of randomness that an attacker is unable to guess. 5322 * 5323 * Params: 5324 * key = a key 5325 * 5326 * Returns: the hash value corresponding to the key 5327 */ 5328 public alias extern(C) uint function(void* key) GHashFunc; 5329 5330 /** 5331 * Defines the type of a hook function that can be invoked 5332 * by g_hook_list_invoke_check(). 5333 * 5334 * Params: 5335 * data = the data field of the #GHook is passed to the hook function here 5336 * 5337 * Returns: %FALSE if the #GHook should be destroyed 5338 */ 5339 public alias extern(C) int function(void* data) GHookCheckFunc; 5340 5341 /** 5342 * Defines the type of function used by g_hook_list_marshal_check(). 5343 * 5344 * Params: 5345 * hook = a #GHook 5346 * marshalData = user data 5347 * 5348 * Returns: %FALSE if @hook should be destroyed 5349 */ 5350 public alias extern(C) int function(GHook* hook, void* marshalData) GHookCheckMarshaller; 5351 5352 /** 5353 * Defines the type of function used to compare #GHook elements in 5354 * g_hook_insert_sorted(). 5355 * 5356 * Params: 5357 * newHook = the #GHook being inserted 5358 * sibling = the #GHook to compare with @new_hook 5359 * 5360 * Returns: a value <= 0 if @new_hook should be before @sibling 5361 */ 5362 public alias extern(C) int function(GHook* newHook, GHook* sibling) GHookCompareFunc; 5363 5364 /** 5365 * Defines the type of function to be called when a hook in a 5366 * list of hooks gets finalized. 5367 * 5368 * Params: 5369 * hookList = a #GHookList 5370 * hook = the hook in @hook_list that gets finalized 5371 */ 5372 public alias extern(C) void function(GHookList* hookList, GHook* hook) GHookFinalizeFunc; 5373 5374 /** 5375 * Defines the type of the function passed to g_hook_find(). 5376 * 5377 * Params: 5378 * hook = a #GHook 5379 * data = user data passed to g_hook_find_func() 5380 * 5381 * Returns: %TRUE if the required #GHook has been found 5382 */ 5383 public alias extern(C) int function(GHook* hook, void* data) GHookFindFunc; 5384 5385 /** 5386 * Defines the type of a hook function that can be invoked 5387 * by g_hook_list_invoke(). 5388 * 5389 * Params: 5390 * data = the data field of the #GHook is passed to the hook function here 5391 */ 5392 public alias extern(C) void function(void* data) GHookFunc; 5393 5394 /** 5395 * Defines the type of function used by g_hook_list_marshal(). 5396 * 5397 * Params: 5398 * hook = a #GHook 5399 * marshalData = user data 5400 */ 5401 public alias extern(C) void function(GHook* hook, void* marshalData) GHookMarshaller; 5402 5403 /** 5404 * Specifies the type of function passed to g_io_add_watch() or 5405 * g_io_add_watch_full(), which is called when the requested condition 5406 * on a #GIOChannel is satisfied. 5407 * 5408 * Params: 5409 * source = the #GIOChannel event source 5410 * condition = the condition which has been satisfied 5411 * data = user data set in g_io_add_watch() or g_io_add_watch_full() 5412 * 5413 * Returns: the function should return %FALSE if the event source 5414 * should be removed 5415 */ 5416 public alias extern(C) int function(GIOChannel* source, GIOCondition condition, void* data) GIOFunc; 5417 5418 /** 5419 * Specifies the prototype of log handler functions. 5420 * 5421 * The default log handler, g_log_default_handler(), automatically appends a 5422 * new-line character to @message when printing it. It is advised that any 5423 * custom log handler functions behave similarly, so that logging calls in user 5424 * code do not need modifying to add a new-line character to the message if the 5425 * log handler is changed. 5426 * 5427 * This is not used if structured logging is enabled; see 5428 * [Using Structured Logging][using-structured-logging]. 5429 * 5430 * Params: 5431 * logDomain = the log domain of the message 5432 * logLevel = the log level of the message (including the 5433 * fatal and recursion flags) 5434 * message = the message to process 5435 * userData = user data, set in g_log_set_handler() 5436 */ 5437 public alias extern(C) void function(const(char)* logDomain, GLogLevelFlags logLevel, const(char)* message, void* userData) GLogFunc; 5438 5439 /** 5440 * Writer function for log entries. A log entry is a collection of one or more 5441 * #GLogFields, using the standard [field names from journal 5442 * specification](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html). 5443 * See g_log_structured() for more information. 5444 * 5445 * Writer functions must ignore fields which they do not recognise, unless they 5446 * can write arbitrary binary output, as field values may be arbitrary binary. 5447 * 5448 * @log_level is guaranteed to be included in @fields as the `PRIORITY` field, 5449 * but is provided separately for convenience of deciding whether or where to 5450 * output the log entry. 5451 * 5452 * Writer functions should return %G_LOG_WRITER_HANDLED if they handled the log 5453 * message successfully or if they deliberately ignored it. If there was an 5454 * error handling the message (for example, if the writer function is meant to 5455 * send messages to a remote logging server and there is a network error), it 5456 * should return %G_LOG_WRITER_UNHANDLED. This allows writer functions to be 5457 * chained and fall back to simpler handlers in case of failure. 5458 * 5459 * Params: 5460 * logLevel = log level of the message 5461 * fields = fields forming the message 5462 * nFields = number of @fields 5463 * userData = user data passed to g_log_set_writer_func() 5464 * 5465 * Returns: %G_LOG_WRITER_HANDLED if the log entry was handled successfully; 5466 * %G_LOG_WRITER_UNHANDLED otherwise 5467 * 5468 * Since: 2.50 5469 */ 5470 public alias extern(C) GLogWriterOutput function(GLogLevelFlags logLevel, GLogField* fields, size_t nFields, void* userData) GLogWriterFunc; 5471 5472 /** 5473 * Specifies the type of function passed to g_node_children_foreach(). 5474 * The function is called with each child node, together with the user 5475 * data passed to g_node_children_foreach(). 5476 * 5477 * Params: 5478 * node = a #GNode. 5479 * data = user data passed to g_node_children_foreach(). 5480 */ 5481 public alias extern(C) void function(GNode* node, void* data) GNodeForeachFunc; 5482 5483 /** 5484 * Specifies the type of function passed to g_node_traverse(). The 5485 * function is called with each of the nodes visited, together with the 5486 * user data passed to g_node_traverse(). If the function returns 5487 * %TRUE, then the traversal is stopped. 5488 * 5489 * Params: 5490 * node = a #GNode. 5491 * data = user data passed to g_node_traverse(). 5492 * 5493 * Returns: %TRUE to stop the traversal. 5494 */ 5495 public alias extern(C) int function(GNode* node, void* data) GNodeTraverseFunc; 5496 5497 /** 5498 * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK 5499 * options. 5500 * 5501 * Params: 5502 * optionName = The name of the option being parsed. This will be either a 5503 * single dash followed by a single letter (for a short name) or two dashes 5504 * followed by a long option name. 5505 * value = The value to be parsed. 5506 * data = User data added to the #GOptionGroup containing the option when it 5507 * was created with g_option_group_new() 5508 * 5509 * Returns: %TRUE if the option was successfully parsed, %FALSE if an error 5510 * occurred, in which case @error should be set with g_set_error() 5511 * 5512 * Throws: GException on failure. 5513 */ 5514 public alias extern(C) int function(const(char)* optionName, const(char)* value, void* data, GError** err) GOptionArgFunc; 5515 5516 /** 5517 * The type of function to be used as callback when a parse error occurs. 5518 * 5519 * Params: 5520 * context = The active #GOptionContext 5521 * group = The group to which the function belongs 5522 * data = User data added to the #GOptionGroup containing the option when it 5523 * was created with g_option_group_new() 5524 * 5525 * Throws: GException on failure. 5526 */ 5527 public alias extern(C) void function(GOptionContext* context, GOptionGroup* group, void* data, GError** err) GOptionErrorFunc; 5528 5529 /** 5530 * The type of function that can be called before and after parsing. 5531 * 5532 * Params: 5533 * context = The active #GOptionContext 5534 * group = The group to which the function belongs 5535 * data = User data added to the #GOptionGroup containing the option when it 5536 * was created with g_option_group_new() 5537 * 5538 * Returns: %TRUE if the function completed successfully, %FALSE if an error 5539 * occurred, in which case @error should be set with g_set_error() 5540 * 5541 * Throws: GException on failure. 5542 */ 5543 public alias extern(C) int function(GOptionContext* context, GOptionGroup* group, void* data, GError** err) GOptionParseFunc; 5544 5545 /** 5546 * Specifies the type of function passed to g_main_context_set_poll_func(). 5547 * The semantics of the function should match those of the poll() system call. 5548 * 5549 * Params: 5550 * ufds = an array of #GPollFD elements 5551 * nfsd = the number of elements in @ufds 5552 * timeout = the maximum time to wait for an event of the file descriptors. 5553 * A negative value indicates an infinite timeout. 5554 * 5555 * Returns: the number of #GPollFD elements which have events or errors 5556 * reported, or -1 if an error occurred. 5557 */ 5558 public alias extern(C) int function(GPollFD* ufds, uint nfsd, int timeout) GPollFunc; 5559 5560 /** 5561 * Specifies the type of the print handler functions. 5562 * These are called with the complete formatted string to output. 5563 * 5564 * Params: 5565 * string_ = the message to output 5566 */ 5567 public alias extern(C) void function(const(char)* string_) GPrintFunc; 5568 5569 /** 5570 * Specifies the type of the function passed to g_regex_replace_eval(). 5571 * It is called for each occurrence of the pattern in the string passed 5572 * to g_regex_replace_eval(), and it should append the replacement to 5573 * @result. 5574 * 5575 * Params: 5576 * matchInfo = the #GMatchInfo generated by the match. 5577 * Use g_match_info_get_regex() and g_match_info_get_string() if you 5578 * need the #GRegex or the matched string. 5579 * result = a #GString containing the new string 5580 * userData = user data passed to g_regex_replace_eval() 5581 * 5582 * Returns: %FALSE to continue the replacement process, %TRUE to stop it 5583 * 5584 * Since: 2.14 5585 */ 5586 public alias extern(C) int function(GMatchInfo* matchInfo, GString* result, void* userData) GRegexEvalCallback; 5587 5588 /** 5589 * Specifies the type of the message handler function. 5590 * 5591 * Params: 5592 * scanner = a #GScanner 5593 * message = the message 5594 * error = %TRUE if the message signals an error, 5595 * %FALSE if it signals a warning. 5596 */ 5597 public alias extern(C) void function(GScanner* scanner, char* message, int error) GScannerMsgFunc; 5598 5599 /** 5600 * A #GSequenceIterCompareFunc is a function used to compare iterators. 5601 * It must return zero if the iterators compare equal, a negative value 5602 * if @a comes before @b, and a positive value if @b comes before @a. 5603 * 5604 * Params: 5605 * a = a #GSequenceIter 5606 * b = a #GSequenceIter 5607 * data = user data 5608 * 5609 * Returns: zero if the iterators are equal, a negative value if @a 5610 * comes before @b, and a positive value if @b comes before @a. 5611 */ 5612 public alias extern(C) int function(GSequenceIter* a, GSequenceIter* b, void* data) GSequenceIterCompareFunc; 5613 5614 /** 5615 * Dispose function for @source. See g_source_set_dispose_function() for 5616 * details. 5617 * 5618 * Params: 5619 * source = #GSource that is currently being disposed 5620 * 5621 * Since: 2.64 5622 */ 5623 public alias extern(C) void function(GSource* source) GSourceDisposeFunc; 5624 5625 /** 5626 * This is just a placeholder for #GClosureMarshal, 5627 * which cannot be used here for dependency reasons. 5628 */ 5629 public alias extern(C) void function() GSourceDummyMarshal; 5630 5631 /** 5632 * Specifies the type of function passed to g_timeout_add(), 5633 * g_timeout_add_full(), g_idle_add(), and g_idle_add_full(). 5634 * 5635 * When calling g_source_set_callback(), you may need to cast a function of a 5636 * different type to this type. Use G_SOURCE_FUNC() to avoid warnings about 5637 * incompatible function types. 5638 * 5639 * Params: 5640 * userData = data passed to the function, set when the source was 5641 * created with one of the above functions 5642 * 5643 * Returns: %FALSE if the source should be removed. %G_SOURCE_CONTINUE and 5644 * %G_SOURCE_REMOVE are more memorable names for the return value. 5645 */ 5646 public alias extern(C) int function(void* userData) GSourceFunc; 5647 5648 /** 5649 * Specifies the type of the setup function passed to g_spawn_async(), 5650 * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very 5651 * limited ways, be used to affect the child's execution. 5652 * 5653 * On POSIX platforms, the function is called in the child after GLib 5654 * has performed all the setup it plans to perform, but before calling 5655 * exec(). Actions taken in this function will only affect the child, 5656 * not the parent. 5657 * 5658 * On Windows, the function is called in the parent. Its usefulness on 5659 * Windows is thus questionable. In many cases executing the child setup 5660 * function in the parent can have ill effects, and you should be very 5661 * careful when porting software to Windows that uses child setup 5662 * functions. 5663 * 5664 * However, even on POSIX, you are extremely limited in what you can 5665 * safely do from a #GSpawnChildSetupFunc, because any mutexes that were 5666 * held by other threads in the parent process at the time of the fork() 5667 * will still be locked in the child process, and they will never be 5668 * unlocked (since the threads that held them don't exist in the child). 5669 * POSIX allows only async-signal-safe functions (see signal(7)) to be 5670 * called in the child between fork() and exec(), which drastically limits 5671 * the usefulness of child setup functions. 5672 * 5673 * In particular, it is not safe to call any function which may 5674 * call malloc(), which includes POSIX functions such as setenv(). 5675 * If you need to set up the child environment differently from 5676 * the parent, you should use g_get_environ(), g_environ_setenv(), 5677 * and g_environ_unsetenv(), and then pass the complete environment 5678 * list to the `g_spawn...` function. 5679 * 5680 * Params: 5681 * userData = user data to pass to the function. 5682 */ 5683 public alias extern(C) void function(void* userData) GSpawnChildSetupFunc; 5684 5685 /** 5686 * The type used for test case functions that take an extra pointer 5687 * argument. 5688 * 5689 * Params: 5690 * userData = the data provided when registering the test 5691 * 5692 * Since: 2.28 5693 */ 5694 public alias extern(C) void function(void* userData) GTestDataFunc; 5695 5696 /** 5697 * The type used for functions that operate on test fixtures. This is 5698 * used for the fixture setup and teardown functions as well as for the 5699 * testcases themselves. 5700 * 5701 * @user_data is a pointer to the data that was given when registering 5702 * the test case. 5703 * 5704 * @fixture will be a pointer to the area of memory allocated by the 5705 * test framework, of the size requested. If the requested size was 5706 * zero then @fixture will be equal to @user_data. 5707 * 5708 * Params: 5709 * fixture = the test fixture 5710 * userData = the data provided when registering the test 5711 * 5712 * Since: 2.28 5713 */ 5714 public alias extern(C) void function(void* fixture, void* userData) GTestFixtureFunc; 5715 5716 /** 5717 * The type used for test case functions. 5718 * 5719 * Since: 2.28 5720 */ 5721 public alias extern(C) void function() GTestFunc; 5722 5723 /** 5724 * Specifies the prototype of fatal log handler functions. 5725 * 5726 * Params: 5727 * logDomain = the log domain of the message 5728 * logLevel = the log level of the message (including the fatal and recursion flags) 5729 * message = the message to process 5730 * userData = user data, set in g_test_log_set_fatal_handler() 5731 * 5732 * Returns: %TRUE if the program should abort, %FALSE otherwise 5733 * 5734 * Since: 2.22 5735 */ 5736 public alias extern(C) int function(const(char)* logDomain, GLogLevelFlags logLevel, const(char)* message, void* userData) GTestLogFatalFunc; 5737 5738 /** 5739 * Specifies the type of the @func functions passed to g_thread_new() 5740 * or g_thread_try_new(). 5741 * 5742 * Params: 5743 * data = data passed to the thread 5744 * 5745 * Returns: the return value of the thread 5746 */ 5747 public alias extern(C) void* function(void* data) GThreadFunc; 5748 5749 /** 5750 * The type of functions which are used to translate user-visible 5751 * strings, for <option>--help</option> output. 5752 * 5753 * Params: 5754 * str = the untranslated string 5755 * data = user data specified when installing the function, e.g. 5756 * in g_option_group_set_translate_func() 5757 * 5758 * Returns: a translation of the string for the current locale. 5759 * The returned string is owned by GLib and must not be freed. 5760 */ 5761 public alias extern(C) const(char)* function(const(char)* str, void* data) GTranslateFunc; 5762 5763 /** 5764 * Specifies the type of function passed to g_tree_traverse(). It is 5765 * passed the key and value of each node, together with the @user_data 5766 * parameter passed to g_tree_traverse(). If the function returns 5767 * %TRUE, the traversal is stopped. 5768 * 5769 * Params: 5770 * key = a key of a #GTree node 5771 * value = the value corresponding to the key 5772 * data = user data passed to g_tree_traverse() 5773 * 5774 * Returns: %TRUE to stop the traversal 5775 */ 5776 public alias extern(C) int function(void* key, void* value, void* data) GTraverseFunc; 5777 5778 /** 5779 * Specifies the type of function passed to g_tree_foreach_node(). It is 5780 * passed each node, together with the @user_data parameter passed to 5781 * g_tree_foreach_node(). If the function returns %TRUE, the traversal is 5782 * stopped. 5783 * 5784 * Params: 5785 * node = a #GTreeNode 5786 * data = user data passed to g_tree_foreach_node() 5787 * 5788 * Returns: %TRUE to stop the traversal 5789 * 5790 * Since: 2.68 5791 */ 5792 public alias extern(C) int function(GTreeNode* node, void* data) GTraverseNodeFunc; 5793 5794 /** 5795 * The type of functions to be called when a UNIX fd watch source 5796 * triggers. 5797 * 5798 * Params: 5799 * fd = the fd that triggered the event 5800 * condition = the IO conditions reported on @fd 5801 * userData = user data passed to g_unix_fd_add() 5802 * 5803 * Returns: %FALSE if the source should be removed 5804 */ 5805 public alias extern(C) int function(int fd, GIOCondition condition, void* userData) GUnixFDSourceFunc; 5806 5807 /** 5808 * Declares a type of function which takes no arguments 5809 * and has no return value. It is used to specify the type 5810 * function passed to g_atexit(). 5811 */ 5812 public alias extern(C) void function() GVoidFunc; 5813 5814 /** 5815 * Specifies the type of the module initialization function. 5816 * If a module contains a function named g_module_check_init() it is called 5817 * automatically when the module is loaded. It is passed the #GModule structure 5818 * and should return %NULL on success or a string describing the initialization 5819 * error. 5820 * 5821 * Params: 5822 * module_ = the #GModule corresponding to the module which has just been loaded 5823 * 5824 * Returns: %NULL on success, or a string describing the initialization error 5825 */ 5826 public alias extern(C) const(char)* function(GModule* module_) GModuleCheckInit; 5827 5828 /** 5829 * Specifies the type of the module function called when it is unloaded. 5830 * If a module contains a function named g_module_unload() it is called 5831 * automatically when the module is unloaded. 5832 * It is passed the #GModule structure. 5833 * 5834 * Params: 5835 * module_ = the #GModule about to be unloaded 5836 */ 5837 public alias extern(C) void function(GModule* module_) GModuleUnload; 5838 5839 enum ANALYZER_ANALYZING = 1; 5840 alias G_ANALYZER_ANALYZING = ANALYZER_ANALYZING; 5841 5842 /** 5843 * A good size for a buffer to be passed into g_ascii_dtostr(). 5844 * It is guaranteed to be enough for all output of that function 5845 * on systems with 64bit IEEE-compatible doubles. 5846 * 5847 * The typical usage would be something like: 5848 * |[<!-- language="C" --> 5849 * char buf[G_ASCII_DTOSTR_BUF_SIZE]; 5850 * 5851 * fprintf (out, "value=%s\n", g_ascii_dtostr (buf, sizeof (buf), value)); 5852 * ]| 5853 */ 5854 enum ASCII_DTOSTR_BUF_SIZE = 39; 5855 alias G_ASCII_DTOSTR_BUF_SIZE = ASCII_DTOSTR_BUF_SIZE; 5856 5857 /** 5858 * Specifies one of the possible types of byte order. 5859 * See %G_BYTE_ORDER. 5860 */ 5861 enum BIG_ENDIAN = 4321; 5862 alias G_BIG_ENDIAN = BIG_ENDIAN; 5863 5864 /** 5865 * The set of uppercase ASCII alphabet characters. 5866 * Used for specifying valid identifier characters 5867 * in #GScannerConfig. 5868 */ 5869 enum CSET_A_2_Z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 5870 alias G_CSET_A_2_Z = CSET_A_2_Z; 5871 5872 /** 5873 * The set of ASCII digits. 5874 * Used for specifying valid identifier characters 5875 * in #GScannerConfig. 5876 */ 5877 enum CSET_DIGITS = "0123456789"; 5878 alias G_CSET_DIGITS = CSET_DIGITS; 5879 5880 /** 5881 * The set of lowercase ASCII alphabet characters. 5882 * Used for specifying valid identifier characters 5883 * in #GScannerConfig. 5884 */ 5885 enum CSET_a_2_z = "abcdefghijklmnopqrstuvwxyz"; 5886 alias G_CSET_a_2_z = CSET_a_2_z; 5887 5888 /** 5889 * A bitmask that restricts the possible flags passed to 5890 * g_datalist_set_flags(). Passing a flags value where 5891 * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error. 5892 */ 5893 enum DATALIST_FLAGS_MASK = 3; 5894 alias G_DATALIST_FLAGS_MASK = DATALIST_FLAGS_MASK; 5895 5896 /** 5897 * Represents an invalid #GDateDay. 5898 */ 5899 enum DATE_BAD_DAY = 0; 5900 alias G_DATE_BAD_DAY = DATE_BAD_DAY; 5901 5902 /** 5903 * Represents an invalid Julian day number. 5904 */ 5905 enum DATE_BAD_JULIAN = 0; 5906 alias G_DATE_BAD_JULIAN = DATE_BAD_JULIAN; 5907 5908 /** 5909 * Represents an invalid year. 5910 */ 5911 enum DATE_BAD_YEAR = 0; 5912 alias G_DATE_BAD_YEAR = DATE_BAD_YEAR; 5913 5914 /** 5915 * This is the platform dependent conversion specifier for scanning and 5916 * printing values of type #gint16. It is a string literal, but doesn't 5917 * include the percent-sign, such that you can add precision and length 5918 * modifiers between percent-sign and conversion specifier. 5919 * 5920 * |[<!-- language="C" --> 5921 * gint16 in; 5922 * gint32 out; 5923 * sscanf ("42", "%" G_GINT16_FORMAT, &in) 5924 * out = in * 1000; 5925 * g_print ("%" G_GINT32_FORMAT, out); 5926 * ]| 5927 */ 5928 enum GINT16_FORMAT = "hi"; 5929 alias G_GINT16_FORMAT = GINT16_FORMAT; 5930 5931 /** 5932 * The platform dependent length modifier for conversion specifiers 5933 * for scanning and printing values of type #gint16 or #guint16. It 5934 * is a string literal, but doesn't include the percent-sign, such 5935 * that you can add precision and length modifiers between percent-sign 5936 * and conversion specifier and append a conversion specifier. 5937 * 5938 * The following example prints "0x7b"; 5939 * |[<!-- language="C" --> 5940 * gint16 value = 123; 5941 * g_print ("%#" G_GINT16_MODIFIER "x", value); 5942 * ]| 5943 */ 5944 enum GINT16_MODIFIER = "h"; 5945 alias G_GINT16_MODIFIER = GINT16_MODIFIER; 5946 5947 /** 5948 * This is the platform dependent conversion specifier for scanning 5949 * and printing values of type #gint32. See also %G_GINT16_FORMAT. 5950 */ 5951 enum GINT32_FORMAT = "i"; 5952 alias G_GINT32_FORMAT = GINT32_FORMAT; 5953 5954 /** 5955 * The platform dependent length modifier for conversion specifiers 5956 * for scanning and printing values of type #gint32 or #guint32. It 5957 * is a string literal. See also %G_GINT16_MODIFIER. 5958 */ 5959 enum GINT32_MODIFIER = ""; 5960 alias G_GINT32_MODIFIER = GINT32_MODIFIER; 5961 5962 /** 5963 * This is the platform dependent conversion specifier for scanning 5964 * and printing values of type #gint64. See also %G_GINT16_FORMAT. 5965 * 5966 * Some platforms do not support scanning and printing 64-bit integers, 5967 * even though the types are supported. On such platforms %G_GINT64_FORMAT 5968 * is not defined. Note that scanf() may not support 64-bit integers, even 5969 * if %G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() 5970 * is not recommended for parsing anyway; consider using g_ascii_strtoull() 5971 * instead. 5972 */ 5973 enum GINT64_FORMAT = "li"; 5974 alias G_GINT64_FORMAT = GINT64_FORMAT; 5975 5976 /** 5977 * The platform dependent length modifier for conversion specifiers 5978 * for scanning and printing values of type #gint64 or #guint64. 5979 * It is a string literal. 5980 * 5981 * Some platforms do not support printing 64-bit integers, even 5982 * though the types are supported. On such platforms %G_GINT64_MODIFIER 5983 * is not defined. 5984 */ 5985 enum GINT64_MODIFIER = "l"; 5986 alias G_GINT64_MODIFIER = GINT64_MODIFIER; 5987 5988 /** 5989 * This is the platform dependent conversion specifier for scanning 5990 * and printing values of type #gintptr. 5991 */ 5992 enum GINTPTR_FORMAT = "li"; 5993 alias G_GINTPTR_FORMAT = GINTPTR_FORMAT; 5994 5995 /** 5996 * The platform dependent length modifier for conversion specifiers 5997 * for scanning and printing values of type #gintptr or #guintptr. 5998 * It is a string literal. 5999 */ 6000 enum GINTPTR_MODIFIER = "l"; 6001 alias G_GINTPTR_MODIFIER = GINTPTR_MODIFIER; 6002 6003 /** 6004 * Expands to "" on all modern compilers, and to __FUNCTION__ on gcc 6005 * version 2.x. Don't use it. 6006 * 6007 * Deprecated: Use G_STRFUNC() instead 6008 */ 6009 enum GNUC_FUNCTION = ""; 6010 alias G_GNUC_FUNCTION = GNUC_FUNCTION; 6011 6012 /** 6013 * Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__ 6014 * on gcc version 2.x. Don't use it. 6015 * 6016 * Deprecated: Use G_STRFUNC() instead 6017 */ 6018 enum GNUC_PRETTY_FUNCTION = ""; 6019 alias G_GNUC_PRETTY_FUNCTION = GNUC_PRETTY_FUNCTION; 6020 6021 /** 6022 * This is the platform dependent conversion specifier for scanning 6023 * and printing values of type #gsize. See also %G_GINT16_FORMAT. 6024 */ 6025 enum GSIZE_FORMAT = "lu"; 6026 alias G_GSIZE_FORMAT = GSIZE_FORMAT; 6027 6028 /** 6029 * The platform dependent length modifier for conversion specifiers 6030 * for scanning and printing values of type #gsize. It 6031 * is a string literal. 6032 */ 6033 enum GSIZE_MODIFIER = "l"; 6034 alias G_GSIZE_MODIFIER = GSIZE_MODIFIER; 6035 6036 /** 6037 * This is the platform dependent conversion specifier for scanning 6038 * and printing values of type #gssize. See also %G_GINT16_FORMAT. 6039 */ 6040 enum GSSIZE_FORMAT = "li"; 6041 alias G_GSSIZE_FORMAT = GSSIZE_FORMAT; 6042 6043 /** 6044 * The platform dependent length modifier for conversion specifiers 6045 * for scanning and printing values of type #gssize. It 6046 * is a string literal. 6047 */ 6048 enum GSSIZE_MODIFIER = "l"; 6049 alias G_GSSIZE_MODIFIER = GSSIZE_MODIFIER; 6050 6051 /** 6052 * This is the platform dependent conversion specifier for scanning 6053 * and printing values of type #guint16. See also %G_GINT16_FORMAT 6054 */ 6055 enum GUINT16_FORMAT = "hu"; 6056 alias G_GUINT16_FORMAT = GUINT16_FORMAT; 6057 6058 /** 6059 * This is the platform dependent conversion specifier for scanning 6060 * and printing values of type #guint32. See also %G_GINT16_FORMAT. 6061 */ 6062 enum GUINT32_FORMAT = "u"; 6063 alias G_GUINT32_FORMAT = GUINT32_FORMAT; 6064 6065 /** 6066 * This is the platform dependent conversion specifier for scanning 6067 * and printing values of type #guint64. See also %G_GINT16_FORMAT. 6068 * 6069 * Some platforms do not support scanning and printing 64-bit integers, 6070 * even though the types are supported. On such platforms %G_GUINT64_FORMAT 6071 * is not defined. Note that scanf() may not support 64-bit integers, even 6072 * if %G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() 6073 * is not recommended for parsing anyway; consider using g_ascii_strtoull() 6074 * instead. 6075 */ 6076 enum GUINT64_FORMAT = "lu"; 6077 alias G_GUINT64_FORMAT = GUINT64_FORMAT; 6078 6079 /** 6080 * This is the platform dependent conversion specifier 6081 * for scanning and printing values of type #guintptr. 6082 */ 6083 enum GUINTPTR_FORMAT = "lu"; 6084 alias G_GUINTPTR_FORMAT = GUINTPTR_FORMAT; 6085 6086 enum HAVE_GINT64 = 1; 6087 alias G_HAVE_GINT64 = HAVE_GINT64; 6088 6089 enum HAVE_GNUC_VARARGS = 1; 6090 alias G_HAVE_GNUC_VARARGS = HAVE_GNUC_VARARGS; 6091 6092 /** 6093 * Defined to 1 if gcc-style visibility handling is supported. 6094 */ 6095 enum HAVE_GNUC_VISIBILITY = 1; 6096 alias G_HAVE_GNUC_VISIBILITY = HAVE_GNUC_VISIBILITY; 6097 6098 enum HAVE_GROWING_STACK = 0; 6099 alias G_HAVE_GROWING_STACK = HAVE_GROWING_STACK; 6100 6101 enum HAVE_ISO_VARARGS = 1; 6102 alias G_HAVE_ISO_VARARGS = HAVE_ISO_VARARGS; 6103 6104 /** 6105 * The position of the first bit which is not reserved for internal 6106 * use be the #GHook implementation, i.e. 6107 * `1 << G_HOOK_FLAG_USER_SHIFT` is the first 6108 * bit which can be used for application-defined flags. 6109 */ 6110 enum HOOK_FLAG_USER_SHIFT = 4; 6111 alias G_HOOK_FLAG_USER_SHIFT = HOOK_FLAG_USER_SHIFT; 6112 6113 /** 6114 * The bias by which exponents in double-precision floats are offset. 6115 */ 6116 enum IEEE754_DOUBLE_BIAS = 1023; 6117 alias G_IEEE754_DOUBLE_BIAS = IEEE754_DOUBLE_BIAS; 6118 6119 /** 6120 * The bias by which exponents in single-precision floats are offset. 6121 */ 6122 enum IEEE754_FLOAT_BIAS = 127; 6123 alias G_IEEE754_FLOAT_BIAS = IEEE754_FLOAT_BIAS; 6124 6125 /** 6126 * The name of the main group of a desktop entry file, as defined in the 6127 * [Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec). 6128 * Consult the specification for more 6129 * details about the meanings of the keys below. 6130 */ 6131 enum KEY_FILE_DESKTOP_GROUP = "Desktop Entry"; 6132 alias G_KEY_FILE_DESKTOP_GROUP = KEY_FILE_DESKTOP_GROUP; 6133 6134 /** 6135 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string list 6136 * giving the available application actions. 6137 */ 6138 enum KEY_FILE_DESKTOP_KEY_ACTIONS = "Actions"; 6139 alias G_KEY_FILE_DESKTOP_KEY_ACTIONS = KEY_FILE_DESKTOP_KEY_ACTIONS; 6140 6141 /** 6142 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list 6143 * of strings giving the categories in which the desktop entry 6144 * should be shown in a menu. 6145 */ 6146 enum KEY_FILE_DESKTOP_KEY_CATEGORIES = "Categories"; 6147 alias G_KEY_FILE_DESKTOP_KEY_CATEGORIES = KEY_FILE_DESKTOP_KEY_CATEGORIES; 6148 6149 /** 6150 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized 6151 * string giving the tooltip for the desktop entry. 6152 */ 6153 enum KEY_FILE_DESKTOP_KEY_COMMENT = "Comment"; 6154 alias G_KEY_FILE_DESKTOP_KEY_COMMENT = KEY_FILE_DESKTOP_KEY_COMMENT; 6155 6156 /** 6157 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean 6158 * set to true if the application is D-Bus activatable. 6159 */ 6160 enum KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE = "DBusActivatable"; 6161 alias G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE = KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE; 6162 6163 /** 6164 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string 6165 * giving the command line to execute. It is only valid for desktop 6166 * entries with the `Application` type. 6167 */ 6168 enum KEY_FILE_DESKTOP_KEY_EXEC = "Exec"; 6169 alias G_KEY_FILE_DESKTOP_KEY_EXEC = KEY_FILE_DESKTOP_KEY_EXEC; 6170 6171 /** 6172 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized 6173 * string giving the generic name of the desktop entry. 6174 */ 6175 enum KEY_FILE_DESKTOP_KEY_GENERIC_NAME = "GenericName"; 6176 alias G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME = KEY_FILE_DESKTOP_KEY_GENERIC_NAME; 6177 6178 /** 6179 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean 6180 * stating whether the desktop entry has been deleted by the user. 6181 */ 6182 enum KEY_FILE_DESKTOP_KEY_HIDDEN = "Hidden"; 6183 alias G_KEY_FILE_DESKTOP_KEY_HIDDEN = KEY_FILE_DESKTOP_KEY_HIDDEN; 6184 6185 /** 6186 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized 6187 * string giving the name of the icon to be displayed for the desktop 6188 * entry. 6189 */ 6190 enum KEY_FILE_DESKTOP_KEY_ICON = "Icon"; 6191 alias G_KEY_FILE_DESKTOP_KEY_ICON = KEY_FILE_DESKTOP_KEY_ICON; 6192 6193 /** 6194 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list 6195 * of strings giving the MIME types supported by this desktop entry. 6196 */ 6197 enum KEY_FILE_DESKTOP_KEY_MIME_TYPE = "MimeType"; 6198 alias G_KEY_FILE_DESKTOP_KEY_MIME_TYPE = KEY_FILE_DESKTOP_KEY_MIME_TYPE; 6199 6200 /** 6201 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized 6202 * string giving the specific name of the desktop entry. 6203 */ 6204 enum KEY_FILE_DESKTOP_KEY_NAME = "Name"; 6205 alias G_KEY_FILE_DESKTOP_KEY_NAME = KEY_FILE_DESKTOP_KEY_NAME; 6206 6207 /** 6208 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list of 6209 * strings identifying the environments that should not display the 6210 * desktop entry. 6211 */ 6212 enum KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN = "NotShowIn"; 6213 alias G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN = KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN; 6214 6215 /** 6216 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean 6217 * stating whether the desktop entry should be shown in menus. 6218 */ 6219 enum KEY_FILE_DESKTOP_KEY_NO_DISPLAY = "NoDisplay"; 6220 alias G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY = KEY_FILE_DESKTOP_KEY_NO_DISPLAY; 6221 6222 /** 6223 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list of 6224 * strings identifying the environments that should display the 6225 * desktop entry. 6226 */ 6227 enum KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN = "OnlyShowIn"; 6228 alias G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN = KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN; 6229 6230 /** 6231 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string 6232 * containing the working directory to run the program in. It is only 6233 * valid for desktop entries with the `Application` type. 6234 */ 6235 enum KEY_FILE_DESKTOP_KEY_PATH = "Path"; 6236 alias G_KEY_FILE_DESKTOP_KEY_PATH = KEY_FILE_DESKTOP_KEY_PATH; 6237 6238 /** 6239 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean 6240 * stating whether the application supports the 6241 * [Startup Notification Protocol Specification](http://www.freedesktop.org/Standards/startup-notification-spec). 6242 */ 6243 enum KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY = "StartupNotify"; 6244 alias G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY = KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY; 6245 6246 /** 6247 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is string 6248 * identifying the WM class or name hint of a window that the application 6249 * will create, which can be used to emulate Startup Notification with 6250 * older applications. 6251 */ 6252 enum KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS = "StartupWMClass"; 6253 alias G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS = KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS; 6254 6255 /** 6256 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean 6257 * stating whether the program should be run in a terminal window. 6258 * 6259 * It is only valid for desktop entries with the `Application` type. 6260 */ 6261 enum KEY_FILE_DESKTOP_KEY_TERMINAL = "Terminal"; 6262 alias G_KEY_FILE_DESKTOP_KEY_TERMINAL = KEY_FILE_DESKTOP_KEY_TERMINAL; 6263 6264 /** 6265 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string 6266 * giving the file name of a binary on disk used to determine if the 6267 * program is actually installed. It is only valid for desktop entries 6268 * with the `Application` type. 6269 */ 6270 enum KEY_FILE_DESKTOP_KEY_TRY_EXEC = "TryExec"; 6271 alias G_KEY_FILE_DESKTOP_KEY_TRY_EXEC = KEY_FILE_DESKTOP_KEY_TRY_EXEC; 6272 6273 /** 6274 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string 6275 * giving the type of the desktop entry. 6276 * 6277 * Usually %G_KEY_FILE_DESKTOP_TYPE_APPLICATION, 6278 * %G_KEY_FILE_DESKTOP_TYPE_LINK, or 6279 * %G_KEY_FILE_DESKTOP_TYPE_DIRECTORY. 6280 */ 6281 enum KEY_FILE_DESKTOP_KEY_TYPE = "Type"; 6282 alias G_KEY_FILE_DESKTOP_KEY_TYPE = KEY_FILE_DESKTOP_KEY_TYPE; 6283 6284 /** 6285 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string 6286 * giving the URL to access. It is only valid for desktop entries 6287 * with the `Link` type. 6288 */ 6289 enum KEY_FILE_DESKTOP_KEY_URL = "URL"; 6290 alias G_KEY_FILE_DESKTOP_KEY_URL = KEY_FILE_DESKTOP_KEY_URL; 6291 6292 /** 6293 * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string 6294 * giving the version of the Desktop Entry Specification used for 6295 * the desktop entry file. 6296 */ 6297 enum KEY_FILE_DESKTOP_KEY_VERSION = "Version"; 6298 alias G_KEY_FILE_DESKTOP_KEY_VERSION = KEY_FILE_DESKTOP_KEY_VERSION; 6299 6300 /** 6301 * The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop 6302 * entries representing applications. 6303 */ 6304 enum KEY_FILE_DESKTOP_TYPE_APPLICATION = "Application"; 6305 alias G_KEY_FILE_DESKTOP_TYPE_APPLICATION = KEY_FILE_DESKTOP_TYPE_APPLICATION; 6306 6307 /** 6308 * The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop 6309 * entries representing directories. 6310 */ 6311 enum KEY_FILE_DESKTOP_TYPE_DIRECTORY = "Directory"; 6312 alias G_KEY_FILE_DESKTOP_TYPE_DIRECTORY = KEY_FILE_DESKTOP_TYPE_DIRECTORY; 6313 6314 /** 6315 * The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop 6316 * entries representing links to documents. 6317 */ 6318 enum KEY_FILE_DESKTOP_TYPE_LINK = "Link"; 6319 alias G_KEY_FILE_DESKTOP_TYPE_LINK = KEY_FILE_DESKTOP_TYPE_LINK; 6320 6321 /** 6322 * Specifies one of the possible types of byte order. 6323 * See %G_BYTE_ORDER. 6324 */ 6325 enum LITTLE_ENDIAN = 1234; 6326 alias G_LITTLE_ENDIAN = LITTLE_ENDIAN; 6327 6328 /** 6329 * Defines the log domain. See [Log Domains](#log-domains). 6330 * 6331 * Libraries should define this so that any messages 6332 * which they log can be differentiated from messages from other 6333 * libraries and application code. But be careful not to define 6334 * it in any public header files. 6335 * 6336 * Log domains must be unique, and it is recommended that they are the 6337 * application or library name, optionally followed by a hyphen and a sub-domain 6338 * name. For example, `bloatpad` or `bloatpad-io`. 6339 * 6340 * If undefined, it defaults to the default %NULL (or `""`) log domain; this is 6341 * not advisable, as it cannot be filtered against using the `G_MESSAGES_DEBUG` 6342 * environment variable. 6343 * 6344 * For example, GTK+ uses this in its `Makefile.am`: 6345 * |[ 6346 * AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gtk\" 6347 * ]| 6348 * 6349 * Applications can choose to leave it as the default %NULL (or `""`) 6350 * domain. However, defining the domain offers the same advantages as 6351 * above. 6352 */ 6353 enum LOG_DOMAIN = 0; 6354 alias G_LOG_DOMAIN = LOG_DOMAIN; 6355 6356 /** 6357 * GLib log levels that are considered fatal by default. 6358 * 6359 * This is not used if structured logging is enabled; see 6360 * [Using Structured Logging][using-structured-logging]. 6361 */ 6362 enum LOG_FATAL_MASK = 5; 6363 alias G_LOG_FATAL_MASK = LOG_FATAL_MASK; 6364 6365 /** 6366 * Log levels below 1<<G_LOG_LEVEL_USER_SHIFT are used by GLib. 6367 * Higher bits can be used for user-defined log levels. 6368 */ 6369 enum LOG_LEVEL_USER_SHIFT = 8; 6370 alias G_LOG_LEVEL_USER_SHIFT = LOG_LEVEL_USER_SHIFT; 6371 6372 /** 6373 * The major version number of the GLib library. 6374 * 6375 * Like #glib_major_version, but from the headers used at 6376 * application compile time, rather than from the library 6377 * linked against at application run time. 6378 */ 6379 enum MAJOR_VERSION = 2; 6380 alias GLIB_MAJOR_VERSION = MAJOR_VERSION; 6381 6382 /** 6383 * The maximum value which can be held in a #gint16. 6384 */ 6385 enum MAXINT16 = 32767; 6386 alias G_MAXINT16 = MAXINT16; 6387 6388 /** 6389 * The maximum value which can be held in a #gint32. 6390 */ 6391 enum MAXINT32 = 2147483647; 6392 alias G_MAXINT32 = MAXINT32; 6393 6394 /** 6395 * The maximum value which can be held in a #gint64. 6396 */ 6397 enum MAXINT64 = 9223372036854775807UL; 6398 alias G_MAXINT64 = MAXINT64; 6399 6400 /** 6401 * The maximum value which can be held in a #gint8. 6402 */ 6403 enum MAXINT8 = 127; 6404 alias G_MAXINT8 = MAXINT8; 6405 6406 /** 6407 * The maximum value which can be held in a #guint16. 6408 */ 6409 enum MAXUINT16 = 65535; 6410 alias G_MAXUINT16 = MAXUINT16; 6411 6412 /** 6413 * The maximum value which can be held in a #guint32. 6414 */ 6415 enum MAXUINT32 = 4294967295; 6416 alias G_MAXUINT32 = MAXUINT32; 6417 6418 /** 6419 * The maximum value which can be held in a #guint64. 6420 */ 6421 enum MAXUINT64 = 18446744073709551615UL; 6422 alias G_MAXUINT64 = MAXUINT64; 6423 6424 /** 6425 * The maximum value which can be held in a #guint8. 6426 */ 6427 enum MAXUINT8 = 255; 6428 alias G_MAXUINT8 = MAXUINT8; 6429 6430 /** 6431 * The micro version number of the GLib library. 6432 * 6433 * Like #gtk_micro_version, but from the headers used at 6434 * application compile time, rather than from the library 6435 * linked against at application run time. 6436 */ 6437 enum MICRO_VERSION = 0; 6438 alias GLIB_MICRO_VERSION = MICRO_VERSION; 6439 6440 /** 6441 * The minimum value which can be held in a #gint16. 6442 */ 6443 enum MININT16 = -32768; 6444 alias G_MININT16 = MININT16; 6445 6446 /** 6447 * The minimum value which can be held in a #gint32. 6448 */ 6449 enum MININT32 = -2147483648; 6450 alias G_MININT32 = MININT32; 6451 6452 /** 6453 * The minimum value which can be held in a #gint64. 6454 */ 6455 enum MININT64 = -9223372036854775808UL; 6456 alias G_MININT64 = MININT64; 6457 6458 /** 6459 * The minimum value which can be held in a #gint8. 6460 */ 6461 enum MININT8 = -128; 6462 alias G_MININT8 = MININT8; 6463 6464 /** 6465 * The minor version number of the GLib library. 6466 * 6467 * Like #gtk_minor_version, but from the headers used at 6468 * application compile time, rather than from the library 6469 * linked against at application run time. 6470 */ 6471 enum MINOR_VERSION = 72; 6472 alias GLIB_MINOR_VERSION = MINOR_VERSION; 6473 6474 enum MODULE_SUFFIX = "so"; 6475 alias G_MODULE_SUFFIX = MODULE_SUFFIX; 6476 6477 /** 6478 * If a long option in the main group has this name, it is not treated as a 6479 * regular option. Instead it collects all non-option arguments which would 6480 * otherwise be left in `argv`. The option must be of type 6481 * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY 6482 * or %G_OPTION_ARG_FILENAME_ARRAY. 6483 * 6484 * 6485 * Using %G_OPTION_REMAINING instead of simply scanning `argv` 6486 * for leftover arguments has the advantage that GOption takes care of 6487 * necessary encoding conversions for strings or filenames. 6488 */ 6489 enum OPTION_REMAINING = ""; 6490 alias G_OPTION_REMAINING = OPTION_REMAINING; 6491 6492 /** 6493 * Specifies one of the possible types of byte order 6494 * (currently unused). See %G_BYTE_ORDER. 6495 */ 6496 enum PDP_ENDIAN = 3412; 6497 alias G_PDP_ENDIAN = PDP_ENDIAN; 6498 6499 /** 6500 * A format specifier that can be used in printf()-style format strings 6501 * when printing a #GPid. 6502 */ 6503 enum PID_FORMAT = "i"; 6504 alias G_PID_FORMAT = PID_FORMAT; 6505 6506 /** 6507 * A format specifier that can be used in printf()-style format strings 6508 * when printing the @fd member of a #GPollFD. 6509 */ 6510 enum POLLFD_FORMAT = "%d"; 6511 alias G_POLLFD_FORMAT = POLLFD_FORMAT; 6512 6513 /** 6514 * Use this for default priority event sources. 6515 * 6516 * In GLib this priority is used when adding timeout functions 6517 * with g_timeout_add(). In GDK this priority is used for events 6518 * from the X server. 6519 */ 6520 enum PRIORITY_DEFAULT = 0; 6521 alias G_PRIORITY_DEFAULT = PRIORITY_DEFAULT; 6522 6523 /** 6524 * Use this for default priority idle functions. 6525 * 6526 * In GLib this priority is used when adding idle functions with 6527 * g_idle_add(). 6528 */ 6529 enum PRIORITY_DEFAULT_IDLE = 200; 6530 alias G_PRIORITY_DEFAULT_IDLE = PRIORITY_DEFAULT_IDLE; 6531 6532 /** 6533 * Use this for high priority event sources. 6534 * 6535 * It is not used within GLib or GTK+. 6536 */ 6537 enum PRIORITY_HIGH = -100; 6538 alias G_PRIORITY_HIGH = PRIORITY_HIGH; 6539 6540 /** 6541 * Use this for high priority idle functions. 6542 * 6543 * GTK+ uses %G_PRIORITY_HIGH_IDLE + 10 for resizing operations, 6544 * and %G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is 6545 * done to ensure that any pending resizes are processed before any 6546 * pending redraws, so that widgets are not redrawn twice unnecessarily.) 6547 */ 6548 enum PRIORITY_HIGH_IDLE = 100; 6549 alias G_PRIORITY_HIGH_IDLE = PRIORITY_HIGH_IDLE; 6550 6551 /** 6552 * Use this for very low priority background tasks. 6553 * 6554 * It is not used within GLib or GTK+. 6555 */ 6556 enum PRIORITY_LOW = 300; 6557 alias G_PRIORITY_LOW = PRIORITY_LOW; 6558 6559 enum SIZEOF_LONG = 8; 6560 alias GLIB_SIZEOF_LONG = SIZEOF_LONG; 6561 6562 enum SIZEOF_SIZE_T = 8; 6563 alias GLIB_SIZEOF_SIZE_T = SIZEOF_SIZE_T; 6564 6565 enum SIZEOF_SSIZE_T = 8; 6566 alias GLIB_SIZEOF_SSIZE_T = SIZEOF_SSIZE_T; 6567 6568 enum SIZEOF_VOID_P = 8; 6569 alias GLIB_SIZEOF_VOID_P = SIZEOF_VOID_P; 6570 6571 /** 6572 * Use this macro as the return value of a #GSourceFunc to leave 6573 * the #GSource in the main loop. 6574 */ 6575 enum SOURCE_CONTINUE = true; 6576 alias G_SOURCE_CONTINUE = SOURCE_CONTINUE; 6577 6578 /** 6579 * Use this macro as the return value of a #GSourceFunc to remove 6580 * the #GSource from the main loop. 6581 */ 6582 enum SOURCE_REMOVE = false; 6583 alias G_SOURCE_REMOVE = SOURCE_REMOVE; 6584 6585 /** 6586 * The standard delimiters, used in g_strdelimit(). 6587 */ 6588 enum STR_DELIMITERS = "_-|> <."; 6589 alias G_STR_DELIMITERS = STR_DELIMITERS; 6590 6591 enum SYSDEF_AF_INET = 2; 6592 alias GLIB_SYSDEF_AF_INET = SYSDEF_AF_INET; 6593 6594 enum SYSDEF_AF_INET6 = 10; 6595 alias GLIB_SYSDEF_AF_INET6 = SYSDEF_AF_INET6; 6596 6597 enum SYSDEF_AF_UNIX = 1; 6598 alias GLIB_SYSDEF_AF_UNIX = SYSDEF_AF_UNIX; 6599 6600 enum SYSDEF_MSG_DONTROUTE = 4; 6601 alias GLIB_SYSDEF_MSG_DONTROUTE = SYSDEF_MSG_DONTROUTE; 6602 6603 enum SYSDEF_MSG_OOB = 1; 6604 alias GLIB_SYSDEF_MSG_OOB = SYSDEF_MSG_OOB; 6605 6606 enum SYSDEF_MSG_PEEK = 2; 6607 alias GLIB_SYSDEF_MSG_PEEK = SYSDEF_MSG_PEEK; 6608 6609 /** 6610 * Creates a unique temporary directory for each unit test and uses 6611 * g_set_user_dirs() to set XDG directories to point into subdirectories of it 6612 * for the duration of the unit test. The directory tree is cleaned up after the 6613 * test finishes successfully. Note that this doesn’t take effect until 6614 * g_test_run() is called, so calls to (for example) g_get_user_home_dir() will 6615 * return the system-wide value when made in a test program’s main() function. 6616 * 6617 * The following functions will return subdirectories of the temporary directory 6618 * when this option is used. The specific subdirectory paths in use are not 6619 * guaranteed to be stable API — always use a getter function to retrieve them. 6620 * 6621 * - g_get_home_dir() 6622 * - g_get_user_cache_dir() 6623 * - g_get_system_config_dirs() 6624 * - g_get_user_config_dir() 6625 * - g_get_system_data_dirs() 6626 * - g_get_user_data_dir() 6627 * - g_get_user_state_dir() 6628 * - g_get_user_runtime_dir() 6629 * 6630 * The subdirectories may not be created by the test harness; as with normal 6631 * calls to functions like g_get_user_cache_dir(), the caller must be prepared 6632 * to create the directory if it doesn’t exist. 6633 */ 6634 enum TEST_OPTION_ISOLATE_DIRS = "isolate_dirs"; 6635 alias G_TEST_OPTION_ISOLATE_DIRS = TEST_OPTION_ISOLATE_DIRS; 6636 6637 /** 6638 * Evaluates to a time span of one day. 6639 */ 6640 enum TIME_SPAN_DAY = 86400000000UL; 6641 alias G_TIME_SPAN_DAY = TIME_SPAN_DAY; 6642 6643 /** 6644 * Evaluates to a time span of one hour. 6645 */ 6646 enum TIME_SPAN_HOUR = 3600000000UL; 6647 alias G_TIME_SPAN_HOUR = TIME_SPAN_HOUR; 6648 6649 /** 6650 * Evaluates to a time span of one millisecond. 6651 */ 6652 enum TIME_SPAN_MILLISECOND = 1000UL; 6653 alias G_TIME_SPAN_MILLISECOND = TIME_SPAN_MILLISECOND; 6654 6655 /** 6656 * Evaluates to a time span of one minute. 6657 */ 6658 enum TIME_SPAN_MINUTE = 60000000UL; 6659 alias G_TIME_SPAN_MINUTE = TIME_SPAN_MINUTE; 6660 6661 /** 6662 * Evaluates to a time span of one second. 6663 */ 6664 enum TIME_SPAN_SECOND = 1000000UL; 6665 alias G_TIME_SPAN_SECOND = TIME_SPAN_SECOND; 6666 6667 /** 6668 * The maximum length (in codepoints) of a compatibility or canonical 6669 * decomposition of a single Unicode character. 6670 * 6671 * This is as defined by Unicode 6.1. 6672 */ 6673 enum UNICHAR_MAX_DECOMPOSITION_LENGTH = 18; 6674 alias G_UNICHAR_MAX_DECOMPOSITION_LENGTH = UNICHAR_MAX_DECOMPOSITION_LENGTH; 6675 6676 /** 6677 * Generic delimiters characters as defined in 6678 * [RFC 3986](https://tools.ietf.org/html/rfc3986). Includes `:/?#[]@`. 6679 */ 6680 enum URI_RESERVED_CHARS_GENERIC_DELIMITERS = ":/?#[]@"; 6681 alias G_URI_RESERVED_CHARS_GENERIC_DELIMITERS = URI_RESERVED_CHARS_GENERIC_DELIMITERS; 6682 6683 /** 6684 * Subcomponent delimiter characters as defined in 6685 * [RFC 3986](https://tools.ietf.org/html/rfc3986). Includes `!$&'()*+,;=`. 6686 */ 6687 enum URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS = "!$&'()*+,;="; 6688 alias G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS = URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS; 6689 6690 /** 6691 * Number of microseconds in one second (1 million). 6692 * This macro is provided for code readability. 6693 */ 6694 enum USEC_PER_SEC = 1000000; 6695 alias G_USEC_PER_SEC = USEC_PER_SEC; 6696 6697 enum VA_COPY_AS_ARRAY = 1; 6698 alias G_VA_COPY_AS_ARRAY = VA_COPY_AS_ARRAY; 6699 6700 enum WIN32_MSG_HANDLE = 19981206; 6701 alias G_WIN32_MSG_HANDLE = WIN32_MSG_HANDLE; 6702 6703 enum macro__has_attribute___noreturn__ = 0; 6704 alias g_macro__has_attribute___noreturn__ = macro__has_attribute___noreturn__;